diff options
author | Owen Anderson <resistor@mac.com> | 2009-07-15 22:16:10 +0000 |
---|---|---|
committer | Owen Anderson <resistor@mac.com> | 2009-07-15 22:16:10 +0000 |
commit | 0d7c695c74ae6d5f68cc07378c17491915e607d3 (patch) | |
tree | db48115519235081bd14ef55df0e924996804e6d /tools | |
parent | fd2934f190fc13b60f8e5dd9639008d721b170f8 (diff) |
To simplify the upcoming context-on-type change, switch all command line tools to using the default global context for now.
This will let us to hardwire stuff to the global context in the short term while the API is sorted out.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75846 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools')
-rw-r--r-- | tools/bugpoint/bugpoint.cpp | 2 | ||||
-rw-r--r-- | tools/llc/llc.cpp | 2 | ||||
-rw-r--r-- | tools/lli/lli.cpp | 2 | ||||
-rw-r--r-- | tools/llvm-ar/llvm-ar.cpp | 2 | ||||
-rw-r--r-- | tools/llvm-as/llvm-as.cpp | 2 | ||||
-rw-r--r-- | tools/llvm-db/llvm-db.cpp | 2 | ||||
-rw-r--r-- | tools/llvm-dis/llvm-dis.cpp | 2 | ||||
-rw-r--r-- | tools/llvm-extract/llvm-extract.cpp | 2 | ||||
-rw-r--r-- | tools/llvm-ld/llvm-ld.cpp | 2 | ||||
-rw-r--r-- | tools/llvm-link/llvm-link.cpp | 2 | ||||
-rw-r--r-- | tools/llvm-nm/llvm-nm.cpp | 2 | ||||
-rw-r--r-- | tools/llvm-prof/llvm-prof.cpp | 2 | ||||
-rw-r--r-- | tools/llvm-ranlib/llvm-ranlib.cpp | 2 | ||||
-rw-r--r-- | tools/opt/opt.cpp | 2 |
14 files changed, 14 insertions, 14 deletions
diff --git a/tools/bugpoint/bugpoint.cpp b/tools/bugpoint/bugpoint.cpp index 49e0daee6a..89ff7a66ff 100644 --- a/tools/bugpoint/bugpoint.cpp +++ b/tools/bugpoint/bugpoint.cpp @@ -75,7 +75,7 @@ int main(int argc, char **argv) { " for more information.\n"); sys::SetInterruptFunction(BugpointInterruptFunction); - LLVMContext Context; + LLVMContext& Context = getGlobalContext(); BugDriver D(argv[0], AsChild, FindBugs, TimeoutValue, MemoryLimit, Context); if (D.addSources(InputFilenames)) return 1; D.addPasses(PassList.begin(), PassList.end()); diff --git a/tools/llc/llc.cpp b/tools/llc/llc.cpp index 47acb324fb..34587173ab 100644 --- a/tools/llc/llc.cpp +++ b/tools/llc/llc.cpp @@ -208,7 +208,7 @@ static formatted_raw_ostream *GetOutputStream(const char *TargetName, int main(int argc, char **argv) { sys::PrintStackTraceOnErrorSignal(); PrettyStackTraceProgram X(argc, argv); - LLVMContext Context; + LLVMContext &Context = getGlobalContext(); llvm_shutdown_obj Y; // Call llvm_shutdown() on exit. cl::ParseCommandLineOptions(argc, argv, "llvm system compiler\n"); diff --git a/tools/lli/lli.cpp b/tools/lli/lli.cpp index 50711e7a2e..788aca01d6 100644 --- a/tools/lli/lli.cpp +++ b/tools/lli/lli.cpp @@ -94,7 +94,7 @@ int main(int argc, char **argv, char * const *envp) { sys::PrintStackTraceOnErrorSignal(); PrettyStackTraceProgram X(argc, argv); - LLVMContext Context; + LLVMContext &Context = getGlobalContext(); atexit(do_shutdown); // Call llvm_shutdown() on exit. cl::ParseCommandLineOptions(argc, argv, "llvm interpreter & dynamic compiler\n"); diff --git a/tools/llvm-ar/llvm-ar.cpp b/tools/llvm-ar/llvm-ar.cpp index 51f00cd9a5..c31f86ec5f 100644 --- a/tools/llvm-ar/llvm-ar.cpp +++ b/tools/llvm-ar/llvm-ar.cpp @@ -692,7 +692,7 @@ int main(int argc, char **argv) { // Print a stack trace if we signal out. sys::PrintStackTraceOnErrorSignal(); PrettyStackTraceProgram X(argc, argv); - LLVMContext Context; + LLVMContext &Context = getGlobalContext(); llvm_shutdown_obj Y; // Call llvm_shutdown() on exit. // Have the command line options parsed and handle things diff --git a/tools/llvm-as/llvm-as.cpp b/tools/llvm-as/llvm-as.cpp index 1d572f1578..100c5c0075 100644 --- a/tools/llvm-as/llvm-as.cpp +++ b/tools/llvm-as/llvm-as.cpp @@ -55,7 +55,7 @@ int main(int argc, char **argv) { // Print a stack trace if we signal out. sys::PrintStackTraceOnErrorSignal(); PrettyStackTraceProgram X(argc, argv); - LLVMContext Context; + LLVMContext &Context = getGlobalContext(); llvm_shutdown_obj Y; // Call llvm_shutdown() on exit. cl::ParseCommandLineOptions(argc, argv, "llvm .ll -> .bc assembler\n"); diff --git a/tools/llvm-db/llvm-db.cpp b/tools/llvm-db/llvm-db.cpp index 851533e12e..8fb9b5857e 100644 --- a/tools/llvm-db/llvm-db.cpp +++ b/tools/llvm-db/llvm-db.cpp @@ -55,7 +55,7 @@ int main(int argc, char **argv, char * const *envp) { sys::PrintStackTraceOnErrorSignal(); PrettyStackTraceProgram X(argc, argv); - LLVMContext Context; + LLVMContext &Context = getGlobalContext(); llvm_shutdown_obj Y; // Call llvm_shutdown() on exit. std::cout << "NOTE: llvm-db is known useless right now.\n"; try { diff --git a/tools/llvm-dis/llvm-dis.cpp b/tools/llvm-dis/llvm-dis.cpp index 8fa00d5b03..e93d6d4e09 100644 --- a/tools/llvm-dis/llvm-dis.cpp +++ b/tools/llvm-dis/llvm-dis.cpp @@ -49,7 +49,7 @@ int main(int argc, char **argv) { sys::PrintStackTraceOnErrorSignal(); PrettyStackTraceProgram X(argc, argv); - LLVMContext Context; + LLVMContext &Context = getGlobalContext(); llvm_shutdown_obj Y; // Call llvm_shutdown() on exit. try { cl::ParseCommandLineOptions(argc, argv, "llvm .bc -> .ll disassembler\n"); diff --git a/tools/llvm-extract/llvm-extract.cpp b/tools/llvm-extract/llvm-extract.cpp index 4809f9fae2..0fc10df7ce 100644 --- a/tools/llvm-extract/llvm-extract.cpp +++ b/tools/llvm-extract/llvm-extract.cpp @@ -61,7 +61,7 @@ int main(int argc, char **argv) { sys::PrintStackTraceOnErrorSignal(); PrettyStackTraceProgram X(argc, argv); - LLVMContext Context; + LLVMContext &Context = getGlobalContext(); llvm_shutdown_obj Y; // Call llvm_shutdown() on exit. cl::ParseCommandLineOptions(argc, argv, "llvm extractor\n"); diff --git a/tools/llvm-ld/llvm-ld.cpp b/tools/llvm-ld/llvm-ld.cpp index 2b9d2550dc..5828c3a21d 100644 --- a/tools/llvm-ld/llvm-ld.cpp +++ b/tools/llvm-ld/llvm-ld.cpp @@ -507,7 +507,7 @@ int main(int argc, char **argv, char **envp) { sys::PrintStackTraceOnErrorSignal(); PrettyStackTraceProgram X(argc, argv); - LLVMContext Context; + LLVMContext &Context = getGlobalContext(); llvm_shutdown_obj Y; // Call llvm_shutdown() on exit. try { // Initial global variable above for convenience printing of program name. diff --git a/tools/llvm-link/llvm-link.cpp b/tools/llvm-link/llvm-link.cpp index e6349fae5b..4111423894 100644 --- a/tools/llvm-link/llvm-link.cpp +++ b/tools/llvm-link/llvm-link.cpp @@ -84,7 +84,7 @@ int main(int argc, char **argv) { sys::PrintStackTraceOnErrorSignal(); PrettyStackTraceProgram X(argc, argv); - LLVMContext Context; + LLVMContext &Context = getGlobalContext(); llvm_shutdown_obj Y; // Call llvm_shutdown() on exit. cl::ParseCommandLineOptions(argc, argv, "llvm linker\n"); diff --git a/tools/llvm-nm/llvm-nm.cpp b/tools/llvm-nm/llvm-nm.cpp index 5646835148..a71ad2b26a 100644 --- a/tools/llvm-nm/llvm-nm.cpp +++ b/tools/llvm-nm/llvm-nm.cpp @@ -134,7 +134,7 @@ static void DumpSymbolNamesFromModule(Module *M) { } static void DumpSymbolNamesFromFile(std::string &Filename) { - LLVMContext Context; + LLVMContext &Context = getGlobalContext(); std::string ErrorMessage; sys::Path aPath(Filename); // Note: Currently we do not support reading an archive from stdin. diff --git a/tools/llvm-prof/llvm-prof.cpp b/tools/llvm-prof/llvm-prof.cpp index 1450444302..2b2bbe2410 100644 --- a/tools/llvm-prof/llvm-prof.cpp +++ b/tools/llvm-prof/llvm-prof.cpp @@ -256,7 +256,7 @@ int main(int argc, char **argv) { sys::PrintStackTraceOnErrorSignal(); PrettyStackTraceProgram X(argc, argv); - LLVMContext Context; + LLVMContext &Context = getGlobalContext(); llvm_shutdown_obj Y; // Call llvm_shutdown() on exit. try { cl::ParseCommandLineOptions(argc, argv, "llvm profile dump decoder\n"); diff --git a/tools/llvm-ranlib/llvm-ranlib.cpp b/tools/llvm-ranlib/llvm-ranlib.cpp index a311c52802..dffe3ada5f 100644 --- a/tools/llvm-ranlib/llvm-ranlib.cpp +++ b/tools/llvm-ranlib/llvm-ranlib.cpp @@ -49,7 +49,7 @@ int main(int argc, char **argv) { llvm::sys::PrintStackTraceOnErrorSignal(); llvm::PrettyStackTraceProgram X(argc, argv); - LLVMContext Context; + LLVMContext &Context = getGlobalContext(); llvm_shutdown_obj Y; // Call llvm_shutdown() on exit. // Have the command line options parsed and handle things diff --git a/tools/opt/opt.cpp b/tools/opt/opt.cpp index c92fad8f6f..fd86d0dffb 100644 --- a/tools/opt/opt.cpp +++ b/tools/opt/opt.cpp @@ -309,7 +309,7 @@ void AddStandardCompilePasses(PassManager &PM) { // int main(int argc, char **argv) { llvm_shutdown_obj X; // Call llvm_shutdown() on exit. - LLVMContext Context; + LLVMContext &Context = getGlobalContext(); try { cl::ParseCommandLineOptions(argc, argv, "llvm .bc -> .bc modular optimizer and analysis printer\n"); |