Driver: Mark some Compilation members const.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74636 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/include/clang/Driver/Compilation.h b/include/clang/Driver/Compilation.h
index 3ec221f..6414ef1 100644
--- a/include/clang/Driver/Compilation.h
+++ b/include/clang/Driver/Compilation.h
@@ -32,10 +32,10 @@
/// invocation.
class Compilation {
/// The driver we were created by.
- Driver &TheDriver;
+ const Driver &TheDriver;
/// The default tool chain.
- ToolChain &DefaultToolChain;
+ const ToolChain &DefaultToolChain;
/// The original (untranslated) input argument list.
InputArgList *Args;
@@ -56,7 +56,8 @@
ArgStringList ResultFiles;
public:
- Compilation(Driver &D, ToolChain &DefaultToolChain, InputArgList *Args);
+ Compilation(const Driver &D, const ToolChain &DefaultToolChain,
+ InputArgList *Args);
~Compilation();
const Driver &getDriver() const { return TheDriver; }
diff --git a/lib/Driver/Compilation.cpp b/lib/Driver/Compilation.cpp
index d7901a6..7e29b67 100644
--- a/lib/Driver/Compilation.cpp
+++ b/lib/Driver/Compilation.cpp
@@ -21,8 +21,8 @@
#include <errno.h>
using namespace clang::driver;
-Compilation::Compilation(Driver &D,
- ToolChain &_DefaultToolChain,
+Compilation::Compilation(const Driver &D,
+ const ToolChain &_DefaultToolChain,
InputArgList *_Args)
: TheDriver(D), DefaultToolChain(_DefaultToolChain), Args(_Args) {
}