Do not use llvm:getGlobalContext() in unittests

Currently trying to nuke this API from LLVM.

From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 266276
This commit is contained in:
Mehdi Amini 2016-04-14 05:34:32 +00:00
parent 867e91468b
commit 59fb3ac51b
1 changed files with 2 additions and 1 deletions

View File

@ -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);