[cfe-commits] r74636 - in /cfe/trunk: include/clang/Driver/Compilation.h lib/Driver/Compilation.cpp

Daniel Dunbar daniel at zuster.org
Wed Jul 1 13:30:53 PDT 2009


Author: ddunbar
Date: Wed Jul  1 15:30:52 2009
New Revision: 74636

URL: http://llvm.org/viewvc/llvm-project?rev=74636&view=rev
Log:
Driver: Mark some Compilation members const.

Modified:
    cfe/trunk/include/clang/Driver/Compilation.h
    cfe/trunk/lib/Driver/Compilation.cpp

Modified: cfe/trunk/include/clang/Driver/Compilation.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Driver/Compilation.h?rev=74636&r1=74635&r2=74636&view=diff

==============================================================================
--- cfe/trunk/include/clang/Driver/Compilation.h (original)
+++ cfe/trunk/include/clang/Driver/Compilation.h Wed Jul  1 15:30:52 2009
@@ -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; }

Modified: cfe/trunk/lib/Driver/Compilation.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Compilation.cpp?rev=74636&r1=74635&r2=74636&view=diff

==============================================================================
--- cfe/trunk/lib/Driver/Compilation.cpp (original)
+++ cfe/trunk/lib/Driver/Compilation.cpp Wed Jul  1 15:30:52 2009
@@ -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) {
 }





More information about the cfe-commits mailing list