r266276 - Do not use llvm:getGlobalContext() in unittests

Mehdi Amini via cfe-commits cfe-commits at lists.llvm.org
Wed Apr 13 22:34:32 PDT 2016


Author: mehdi_amini
Date: Thu Apr 14 00:34:32 2016
New Revision: 266276

URL: http://llvm.org/viewvc/llvm-project?rev=266276&view=rev
Log:
Do not use llvm:getGlobalContext() in unittests

Currently trying to nuke this API from LLVM.

From: Mehdi Amini <mehdi.amini at apple.com>

Modified:
    cfe/trunk/unittests/CodeGen/BufferSourceTest.cpp

Modified: cfe/trunk/unittests/CodeGen/BufferSourceTest.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/unittests/CodeGen/BufferSourceTest.cpp?rev=266276&r1=266275&r2=266276&view=diff
==============================================================================
--- cfe/trunk/unittests/CodeGen/BufferSourceTest.cpp (original)
+++ cfe/trunk/unittests/CodeGen/BufferSourceTest.cpp Thu Apr 14 00:34:32 2016
@@ -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, EmitCXXGlobalInit
             compiler.getHeaderSearchOpts(),
             compiler.getPreprocessorOpts(),
             compiler.getCodeGenOpts(),
-            llvm::getGlobalContext())));
+            Context)));
 
     compiler.createSema(clang::TU_Prefix, nullptr);
 




More information about the cfe-commits mailing list