summaryrefslogtreecommitdiff
path: root/lib/Archive/Archive.cpp
diff options
context:
space:
mode:
authorOwen Anderson <resistor@mac.com>2009-07-01 21:22:36 +0000
committerOwen Anderson <resistor@mac.com>2009-07-01 21:22:36 +0000
commit31895e73591d3c9ceae731a1274c8f56194b9616 (patch)
tree9e5f714db4af7dddfab061cb0016489f6d114c56 /lib/Archive/Archive.cpp
parentfcd65ae28fe797c174be350a07955713fd42d110 (diff)
downloadllvm-31895e73591d3c9ceae731a1274c8f56194b9616.tar.gz
llvm-31895e73591d3c9ceae731a1274c8f56194b9616.tar.bz2
llvm-31895e73591d3c9ceae731a1274c8f56194b9616.tar.xz
Hold the LLVMContext by reference rather than by pointer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74640 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Archive/Archive.cpp')
-rw-r--r--lib/Archive/Archive.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Archive/Archive.cpp b/lib/Archive/Archive.cpp
index e6903b607f..1a8b25ace2 100644
--- a/lib/Archive/Archive.cpp
+++ b/lib/Archive/Archive.cpp
@@ -138,7 +138,7 @@ bool ArchiveMember::replaceWith(const sys::Path& newFile, std::string* ErrMsg) {
// 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, LLVMContext* C)
+Archive::Archive(const sys::Path& filename, const LLVMContext& C)
: archPath(filename), members(), mapfile(0), base(0), symTab(), strtab(),
symTabSize(0), firstFileOffset(0), modules(), foreignST(0), Context(C) {
}
@@ -208,7 +208,7 @@ static void getSymbols(Module*M, std::vector<std::string>& symbols) {
// Get just the externally visible defined symbols from the bitcode
bool llvm::GetBitcodeSymbols(const sys::Path& fName,
- LLVMContext* Context,
+ const LLVMContext& Context,
std::vector<std::string>& symbols,
std::string* ErrMsg) {
std::auto_ptr<MemoryBuffer> Buffer(
@@ -240,7 +240,7 @@ bool llvm::GetBitcodeSymbols(const sys::Path& fName,
ModuleProvider*
llvm::GetBitcodeSymbols(const unsigned char *BufPtr, unsigned Length,
const std::string& ModuleID,
- LLVMContext* Context,
+ const LLVMContext& Context,
std::vector<std::string>& symbols,
std::string* ErrMsg) {
// Get the module provider