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
This commit is contained in:
Benjamin Kramer 2014-10-03 21:48:23 +00:00
parent 0adda1e4d4
commit de952d1180

View File

@ -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<llvm::MemoryBuffer> Buffer =
llvm::MemoryBuffer::getMemBuffer(AsmString, "<MS inline asm>");