summaryrefslogtreecommitdiff
path: root/tools/llvm-extract
diff options
context:
space:
mode:
authorMehdi Amini <mehdi.amini@apple.com>2016-04-14 21:59:01 +0000
committerMehdi Amini <mehdi.amini@apple.com>2016-04-14 21:59:01 +0000
commit8be7707c14f9eafd5e6eebd1a167c706a2f998f1 (patch)
tree7ba1fe5ff65c10c7398fe83e76283fc2b5e04eda /tools/llvm-extract
parent6d955a1d6dfb81f23dd8fd1829635eed96652b22 (diff)
Remove every uses of getGlobalContext() in LLVM (but the C API)
At the same time, fixes InstructionsTest::CastInst unittest: yes you can leave the IR in an invalid state and exit when you don't destroy the context (like the global one), no longer now. This is the first part of http://reviews.llvm.org/D19094 From: Mehdi Amini <mehdi.amini@apple.com> git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266379 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/llvm-extract')
-rw-r--r--tools/llvm-extract/llvm-extract.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/llvm-extract/llvm-extract.cpp b/tools/llvm-extract/llvm-extract.cpp
index 1da456d33f5..b37b8989a04 100644
--- a/tools/llvm-extract/llvm-extract.cpp
+++ b/tools/llvm-extract/llvm-extract.cpp
@@ -105,7 +105,7 @@ int main(int argc, char **argv) {
sys::PrintStackTraceOnErrorSignal();
PrettyStackTraceProgram X(argc, argv);
- LLVMContext &Context = getGlobalContext();
+ LLVMContext Context;
llvm_shutdown_obj Y; // Call llvm_shutdown() on exit.
cl::ParseCommandLineOptions(argc, argv, "llvm extractor\n");