summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST/StmtPrinter.cpp
diff options
context:
space:
mode:
authorChad Rosier <mcrosier@apple.com>2012-08-15 16:53:30 +0000
committerChad Rosier <mcrosier@apple.com>2012-08-15 16:53:30 +0000
commitb6f46c1af9954bbeec7fdacfb352ab8483a69836 (patch)
tree8d7fabe9c1b81ce83160d2cf3bb21cdd4f3191a3 /clang/lib/AST/StmtPrinter.cpp
parent9f1509fe44a77237a8a222a4b9d01f6911c75139 (diff)
downloadbcm5719-llvm-b6f46c1af9954bbeec7fdacfb352ab8483a69836.tar.gz
bcm5719-llvm-b6f46c1af9954bbeec7fdacfb352ab8483a69836.zip
[ms-inline asm] Add the left brace source location and improve the pretty
printer. Patch by Enea Zaffanella <zaffanella@cs.unipr.it>. llvm-svn: 161958
Diffstat (limited to 'clang/lib/AST/StmtPrinter.cpp')
-rw-r--r--clang/lib/AST/StmtPrinter.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/clang/lib/AST/StmtPrinter.cpp b/clang/lib/AST/StmtPrinter.cpp
index 2f7cb55c7cc..85d5a79569a 100644
--- a/clang/lib/AST/StmtPrinter.cpp
+++ b/clang/lib/AST/StmtPrinter.cpp
@@ -432,7 +432,12 @@ void StmtPrinter::VisitAsmStmt(AsmStmt *Node) {
void StmtPrinter::VisitMSAsmStmt(MSAsmStmt *Node) {
// FIXME: Implement MS style inline asm statement printer.
- Indent() << "asm ()";
+ Indent() << "__asm ";
+ if (Node->hasBraces())
+ OS << "{\n";
+ OS << *(Node->getAsmString()) << "\n";
+ if (Node->hasBraces())
+ Indent() << "}\n";
}
void StmtPrinter::VisitObjCAtTryStmt(ObjCAtTryStmt *Node) {
OpenPOWER on IntegriCloud