From 6773d388aadf0c8588e3cda343ab621397fde38c Mon Sep 17 00:00:00 2001 From: Owen Anderson Date: Wed, 1 Jul 2009 16:58:40 +0000 Subject: Add a pointer to the owning LLVMContext to Module. This requires threading LLVMContext through a lot of the bitcode reader and ASM parser APIs, as well as supporting it in all of the tools. Patches for Clang and LLVM-GCC to follow. llvm-svn: 74614 --- llvm/tools/llvm-db/llvm-db.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'llvm/tools/llvm-db/llvm-db.cpp') diff --git a/llvm/tools/llvm-db/llvm-db.cpp b/llvm/tools/llvm-db/llvm-db.cpp index 04e616227b2..62ee325bfd4 100644 --- a/llvm/tools/llvm-db/llvm-db.cpp +++ b/llvm/tools/llvm-db/llvm-db.cpp @@ -13,6 +13,7 @@ //===----------------------------------------------------------------------===// #include "CLIDebugger.h" +#include "llvm/LLVMContext.h" #include "llvm/Support/CommandLine.h" #include "llvm/Support/ManagedStatic.h" #include "llvm/Support/PrettyStackTrace.h" @@ -54,6 +55,7 @@ int main(int argc, char **argv, char * const *envp) { sys::PrintStackTraceOnErrorSignal(); PrettyStackTraceProgram X(argc, argv); + LLVMContext Context; llvm_shutdown_obj Y; // Call llvm_shutdown() on exit. std::cout << "NOTE: llvm-db is known useless right now.\n"; try { @@ -68,7 +70,7 @@ int main(int argc, char **argv, char * const *envp) { InputArgs.push_back(InputFile); // Create the CLI debugger... - CLIDebugger D; + CLIDebugger D(&Context); // Initialize the debugger with the command line options we read... Debugger &Dbg = D.getDebugger(); -- cgit v1.2.3