From de952d118003838ad4fd724bfabc5c3335ec9c27 Mon Sep 17 00:00:00 2001 From: Benjamin Kramer Date: Fri, 3 Oct 2014 21:48:23 +0000 Subject: [PATCH] Initialize MCObjectFileInfo when parsing ms-style asm. Otherwise we're left with an half-initialized bag of variables that may or may not explode later on. Should bring the MSVC buildbot back to life. llvm-svn: 219023 --- clang/lib/Parse/ParseStmtAsm.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/clang/lib/Parse/ParseStmtAsm.cpp b/clang/lib/Parse/ParseStmtAsm.cpp index 35e2e6294f83..6f89953d0ba1 100644 --- a/clang/lib/Parse/ParseStmtAsm.cpp +++ b/clang/lib/Parse/ParseStmtAsm.cpp @@ -512,6 +512,8 @@ StmtResult Parser::ParseMicrosoftAsmStatement(SourceLocation AsmLoc) { llvm::SourceMgr TempSrcMgr; llvm::MCContext Ctx(MAI.get(), MRI.get(), MOFI.get(), &TempSrcMgr); + MOFI->InitMCObjectFileInfo(TT, llvm::Reloc::Default, llvm::CodeModel::Default, + Ctx); std::unique_ptr Buffer = llvm::MemoryBuffer::getMemBuffer(AsmString, "");