From: Mehdi Amini Date: Thu, 14 Apr 2016 05:34:32 +0000 (+0000) Subject: Do not use llvm:getGlobalContext() in unittests X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0f8827f4f214421a4a9ea796ade447c0227a0e7d;p=clang Do not use llvm:getGlobalContext() in unittests Currently trying to nuke this API from LLVM. From: Mehdi Amini git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@266276 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/unittests/CodeGen/BufferSourceTest.cpp b/unittests/CodeGen/BufferSourceTest.cpp index 85df768aa1..56aafcee35 100644 --- a/unittests/CodeGen/BufferSourceTest.cpp +++ b/unittests/CodeGen/BufferSourceTest.cpp @@ -40,6 +40,7 @@ const char TestProgram[] = TEST(BufferSourceTest, EmitCXXGlobalInitFunc) { CompilerInstance compiler; + LLVMContext Context; compiler.createDiagnostics(); compiler.getLangOpts().CPlusPlus = 1; @@ -65,7 +66,7 @@ TEST(BufferSourceTest, EmitCXXGlobalInitFunc) { compiler.getHeaderSearchOpts(), compiler.getPreprocessorOpts(), compiler.getCodeGenOpts(), - llvm::getGlobalContext()))); + Context))); compiler.createSema(clang::TU_Prefix, nullptr);