aboutsummaryrefslogtreecommitdiff
path: root/tools/llvm-link
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 /tools/llvm-link
parentfcd65ae28fe797c174be350a07955713fd42d110 (diff)
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 'tools/llvm-link')
-rw-r--r--tools/llvm-link/llvm-link.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/llvm-link/llvm-link.cpp b/tools/llvm-link/llvm-link.cpp
index ae5fa40ecb..818df14fd9 100644
--- a/tools/llvm-link/llvm-link.cpp
+++ b/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;