Make the use of const with respect to LLVMContext sane.  Hopefully this is the last time, for the
moment, that I will need to make far-reaching changes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74655 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Archive/Archive.cpp b/lib/Archive/Archive.cpp
index 1a8b25a..bb57262 100644
--- a/lib/Archive/Archive.cpp
+++ b/lib/Archive/Archive.cpp
@@ -138,7 +138,7 @@
 // Archive constructor - this is the only constructor that gets used for the
 // Archive class. Everything else (default,copy) is deprecated. This just
 // initializes and maps the file into memory, if requested.
-Archive::Archive(const sys::Path& filename, const LLVMContext& C)
+Archive::Archive(const sys::Path& filename, LLVMContext& C)
   : archPath(filename), members(), mapfile(0), base(0), symTab(), strtab(),
     symTabSize(0), firstFileOffset(0), modules(), foreignST(0), Context(C) {
 }
@@ -208,7 +208,7 @@
 
 // Get just the externally visible defined symbols from the bitcode
 bool llvm::GetBitcodeSymbols(const sys::Path& fName,
-                             const LLVMContext& Context,
+                             LLVMContext& Context,
                              std::vector<std::string>& symbols,
                              std::string* ErrMsg) {
   std::auto_ptr<MemoryBuffer> Buffer(
@@ -240,7 +240,7 @@
 ModuleProvider*
 llvm::GetBitcodeSymbols(const unsigned char *BufPtr, unsigned Length,
                         const std::string& ModuleID,
-                        const LLVMContext& Context,
+                        LLVMContext& Context,
                         std::vector<std::string>& symbols,
                         std::string* ErrMsg) {
   // Get the module provider
diff --git a/lib/Archive/ArchiveInternals.h b/lib/Archive/ArchiveInternals.h
index 15f01b3..d187ed9 100644
--- a/lib/Archive/ArchiveInternals.h
+++ b/lib/Archive/ArchiveInternals.h
@@ -73,13 +73,13 @@
   
   // Get just the externally visible defined symbols from the bitcode
   bool GetBitcodeSymbols(const sys::Path& fName,
-                          const LLVMContext& Context,
+                          LLVMContext& Context,
                           std::vector<std::string>& symbols,
                           std::string* ErrMsg);
   
   ModuleProvider* GetBitcodeSymbols(const unsigned char*Buffer,unsigned Length,
                                     const std::string& ModuleID,
-                                    const LLVMContext& Context,
+                                    LLVMContext& Context,
                                     std::vector<std::string>& symbols,
                                     std::string* ErrMsg);
 }
diff --git a/lib/Archive/ArchiveReader.cpp b/lib/Archive/ArchiveReader.cpp
index 2393554..718d446 100644
--- a/lib/Archive/ArchiveReader.cpp
+++ b/lib/Archive/ArchiveReader.cpp
@@ -327,7 +327,7 @@
 
 // Open and completely load the archive file.
 Archive*
-Archive::OpenAndLoad(const sys::Path& file, const LLVMContext& C, 
+Archive::OpenAndLoad(const sys::Path& file, LLVMContext& C, 
                      std::string* ErrorMessage) {
   std::auto_ptr<Archive> result ( new Archive(file, C));
   if (result->mapToMemory(ErrorMessage))
@@ -442,7 +442,7 @@
 
 // Open the archive and load just the symbol tables
 Archive* Archive::OpenAndLoadSymbols(const sys::Path& file,
-                                     const LLVMContext& C,
+                                     LLVMContext& C,
                                      std::string* ErrorMessage) {
   std::auto_ptr<Archive> result ( new Archive(file, C) );
   if (result->mapToMemory(ErrorMessage))
diff --git a/lib/Archive/ArchiveWriter.cpp b/lib/Archive/ArchiveWriter.cpp
index e840354..881d75b 100644
--- a/lib/Archive/ArchiveWriter.cpp
+++ b/lib/Archive/ArchiveWriter.cpp
@@ -64,7 +64,7 @@
 }
 
 // Create an empty archive.
-Archive* Archive::CreateEmpty(const sys::Path& FilePath, const LLVMContext& C) {
+Archive* Archive::CreateEmpty(const sys::Path& FilePath, LLVMContext& C) {
   Archive* result = new Archive(FilePath, C);
   return result;
 }