diff options
author | Chris Lattner <sabre@nondot.org> | 2010-04-06 00:58:50 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2010-04-06 00:58:50 +0000 |
commit | 885d94143d0fc02fd5c4ddf1d2a2ee74c7934bff (patch) | |
tree | 20ccf778c8b16410a665534c4ae7e52128c42547 /lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp | |
parent | 6eb7806a5f5edf460e68f52bdd0fad25f7771873 (diff) |
propagate cookie management out one layer of function calls.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100510 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp')
-rw-r--r-- | lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp b/lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp index a4d46c36f3..255bcd413f 100644 --- a/lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp +++ b/lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp @@ -35,7 +35,7 @@ using namespace llvm; /// EmitInlineAsm - Emit a blob of inline asm to the output streamer. -void AsmPrinter::EmitInlineAsm(StringRef Str) const { +void AsmPrinter::EmitInlineAsm(StringRef Str, unsigned LocCookie) const { assert(!Str.empty() && "Can't emit empty inline asm block"); // Remember if the buffer is nul terminated or not so we can avoid a copy. @@ -57,9 +57,8 @@ void AsmPrinter::EmitInlineAsm(StringRef Str) const { LLVMContext &LLVMCtx = MMI->getModule()->getContext(); bool HasDiagHandler = false; if (void *DiagHandler = LLVMCtx.getInlineAsmDiagnosticHandler()) { - unsigned Cookie = 0; // no cookie yet. SrcMgr.setDiagHandler((SourceMgr::DiagHandlerTy)(intptr_t)DiagHandler, - LLVMCtx.getInlineAsmDiagnosticContext(), Cookie); + LLVMCtx.getInlineAsmDiagnosticContext(), LocCookie); HasDiagHandler = true; } @@ -297,7 +296,7 @@ void AsmPrinter::EmitInlineAsm(const MachineInstr *MI) const { } } OS << '\n' << (char)0; // null terminate string. - EmitInlineAsm(OS.str()); + EmitInlineAsm(OS.str(), 0/*no loc cookie*/); // Emit the #NOAPP end marker. This has to happen even if verbose-asm isn't // enabled, so we use EmitRawText. |