Make sure the LLVMContext outlive the CompilerInstance

From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 266277
This commit is contained in:
Mehdi Amini 2016-04-14 05:37:41 +00:00
parent 59fb3ac51b
commit 3d7224c2a7
1 changed files with 1 additions and 1 deletions

View File

@ -39,8 +39,8 @@ const char TestProgram[] =
"EmitCXXGlobalInitFunc test; "; "EmitCXXGlobalInitFunc test; ";
TEST(BufferSourceTest, EmitCXXGlobalInitFunc) { TEST(BufferSourceTest, EmitCXXGlobalInitFunc) {
CompilerInstance compiler;
LLVMContext Context; LLVMContext Context;
CompilerInstance compiler;
compiler.createDiagnostics(); compiler.createDiagnostics();
compiler.getLangOpts().CPlusPlus = 1; compiler.getLangOpts().CPlusPlus = 1;