summaryrefslogtreecommitdiff
path: root/lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2010-04-05 23:15:42 +0000
committerChris Lattner <sabre@nondot.org>2010-04-05 23:15:42 +0000
commit79180e2ef5ff4aa3c8f64b13736e8648663f3965 (patch)
treed05c75a5f645120bd4930ae485a03d5e9b11d77d /lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp
parentaf632c91a0090d8448dd10e48d8ce53f31be0a21 (diff)
downloadllvm-79180e2ef5ff4aa3c8f64b13736e8648663f3965.tar.gz
llvm-79180e2ef5ff4aa3c8f64b13736e8648663f3965.tar.bz2
llvm-79180e2ef5ff4aa3c8f64b13736e8648663f3965.tar.xz
Give AsmParser an option to control whether it finalizes
the stream. New demo: $ clang asm.c -S -o - -emit-llvm | llc -filetype=obj -o t.o $ otool -tv t.o t.o: (__TEXT,__text) section _foo: 0000000000000000 subq $0x08,%rsp 0000000000000004 movl %edi,(%rsp) 0000000000000007 movl %edi,%eax 0000000000000009 incl %eax 000000000000000b movl %eax,(%rsp) 000000000000000e movl %eax,0x04(%rsp) 0000000000000012 addq $0x08,%rsp 0000000000000016 ret git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100492 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp')
-rw-r--r--lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp b/lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp
index 090bd9b2bf..ab55b6b1c9 100644
--- a/lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp
+++ b/lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp
@@ -66,7 +66,8 @@ void AsmPrinter::EmitInlineAsm(StringRef Str) const {
Parser.setTargetParser(*TAP.get());
// Don't implicitly switch to the text section before the asm.
- int Res = Parser.Run(/*NoInitialTextSection*/ true);
+ int Res = Parser.Run(/*NoInitialTextSection*/ true,
+ /*NoFinalize*/ true);
if (Res)
llvm_report_error("Error parsing inline asm\n");
}