diff options
| author | Owen Anderson <resistor@mac.com> | 2009-07-01 21:22:36 +0000 |
|---|---|---|
| committer | Owen Anderson <resistor@mac.com> | 2009-07-01 21:22:36 +0000 |
| commit | 1cf085d558fd73f2599fb68e600365dd20502e2b (patch) | |
| tree | 39bfcf795980a39bd173e8cbc60962da057bbd9d /llvm/tools/llvm-link | |
| parent | 52337414b78f00aa7ff498e5872fd428996e8fe5 (diff) | |
| download | bcm5719-llvm-1cf085d558fd73f2599fb68e600365dd20502e2b.tar.gz bcm5719-llvm-1cf085d558fd73f2599fb68e600365dd20502e2b.zip | |
Hold the LLVMContext by reference rather than by pointer.
llvm-svn: 74640
Diffstat (limited to 'llvm/tools/llvm-link')
| -rw-r--r-- | llvm/tools/llvm-link/llvm-link.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/tools/llvm-link/llvm-link.cpp b/llvm/tools/llvm-link/llvm-link.cpp index ae5fa40ecba..818df14fd99 100644 --- a/llvm/tools/llvm-link/llvm-link.cpp +++ b/llvm/tools/llvm-link/llvm-link.cpp @@ -49,7 +49,7 @@ DumpAsm("d", cl::desc("Print assembly as linked"), cl::Hidden); // searches the link path for the specified file to try to find it... // static inline std::auto_ptr<Module> LoadFile(const std::string &FN, - LLVMContext* Context) { + const LLVMContext& Context) { sys::Path Filename; if (!Filename.set(FN)) { cerr << "Invalid file name: '" << FN << "'\n"; @@ -93,7 +93,7 @@ int main(int argc, char **argv) { unsigned BaseArg = 0; std::string ErrorMessage; - std::auto_ptr<Module> Composite(LoadFile(InputFilenames[BaseArg], &Context)); + std::auto_ptr<Module> Composite(LoadFile(InputFilenames[BaseArg], Context)); if (Composite.get() == 0) { cerr << argv[0] << ": error loading file '" << InputFilenames[BaseArg] << "'\n"; @@ -101,7 +101,7 @@ int main(int argc, char **argv) { } for (unsigned i = BaseArg+1; i < InputFilenames.size(); ++i) { - std::auto_ptr<Module> M(LoadFile(InputFilenames[i], &Context)); + std::auto_ptr<Module> M(LoadFile(InputFilenames[i], Context)); if (M.get() == 0) { cerr << argv[0] << ": error loading file '" <<InputFilenames[i]<< "'\n"; return 1; |

