summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-as-fuzzer/llvm-as-fuzzer.cpp
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
commit03b42e41bf4bdd9ab05ea4c6905bae5d19971960 (patch)
treed4249845a564b11af673299653e7c4e876d8c4f2 /llvm/tools/llvm-as-fuzzer/llvm-as-fuzzer.cpp
parent3d1c1deb04efe0022f11ebc18bb43d7341ba0c75 (diff)
downloadbcm5719-llvm-03b42e41bf4bdd9ab05ea4c6905bae5d19971960.tar.gz
bcm5719-llvm-03b42e41bf4bdd9ab05ea4c6905bae5d19971960.zip
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> llvm-svn: 266379
Diffstat (limited to 'llvm/tools/llvm-as-fuzzer/llvm-as-fuzzer.cpp')
-rw-r--r--llvm/tools/llvm-as-fuzzer/llvm-as-fuzzer.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/tools/llvm-as-fuzzer/llvm-as-fuzzer.cpp b/llvm/tools/llvm-as-fuzzer/llvm-as-fuzzer.cpp
index b4024bcaa99..52deca6e9cd 100644
--- a/llvm/tools/llvm-as-fuzzer/llvm-as-fuzzer.cpp
+++ b/llvm/tools/llvm-as-fuzzer/llvm-as-fuzzer.cpp
@@ -53,7 +53,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) {
// parsed is always null terminated.
std::unique_ptr<MemoryBuffer> MemBuf = MemoryBuffer::getMemBufferCopy(Input);
SMDiagnostic Err;
- LLVMContext &Context = getGlobalContext();
+ LLVMContext Context;
std::unique_ptr<Module> M;
if (setjmp(JmpBuf))
OpenPOWER on IntegriCloud