forked from OSchip/llvm-project
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. llvm-svn: 75846
This commit is contained in:
parent
ebe66ab13b
commit
19251ec836
|
@ -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());
|
||||
|
|
|
@ -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");
|
||||
|
||||
|
|
|
@ -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");
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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");
|
||||
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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");
|
||||
|
|
|
@ -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");
|
||||
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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");
|
||||
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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");
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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");
|
||||
|
|
Loading…
Reference in New Issue