if (!M.getModuleInlineAsm().empty()) {
OutStreamer.AddComment("Start of file scope inline assembly");
OutStreamer.AddBlankLine();
- EmitInlineAsm(M.getModuleInlineAsm(), 0/*no loc cookie*/);
+ EmitInlineAsm(M.getModuleInlineAsm()+"\n", 0/*no loc cookie*/);
OutStreamer.AddComment("End of file scope inline assembly");
OutStreamer.AddBlankLine();
}
}
SourceMgr SrcMgr;
-
- // Ensure the buffer is newline terminated.
- char *TmpString = 0;
- if (Str.back() != '\n') {
- TmpString = new char[Str.size() + 2];
- memcpy(TmpString, Str.data(), Str.size());
- TmpString[Str.size()] = '\n';
- TmpString[Str.size() + 1] = 0;
- isNullTerminated = true;
- Str = TmpString;
- }
// If the current LLVMContext has an inline asm handler, set it in SourceMgr.
LLVMContext &LLVMCtx = MMI->getModule()->getContext();
/*NoFinalize*/ true);
if (Res && !HasDiagHandler)
report_fatal_error("Error parsing inline asm\n");
-
- if (TmpString)
- delete[] TmpString;
}