summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST/StmtPrinter.cpp
diff options
context:
space:
mode:
authorJonathan Roelofs <jonathan@codesourcery.com>2015-06-09 14:13:31 +0000
committerJonathan Roelofs <jonathan@codesourcery.com>2015-06-09 14:13:31 +0000
commit78f9e038e0c53600b174f0671369f5a2f36c1434 (patch)
treed6802a688440e453cea4f02f4b60be04b6d4c94a /clang/lib/AST/StmtPrinter.cpp
parent465acfd13c5d009a90b916557ce204a4758bff74 (diff)
downloadbcm5719-llvm-78f9e038e0c53600b174f0671369f5a2f36c1434.tar.gz
bcm5719-llvm-78f9e038e0c53600b174f0671369f5a2f36c1434.zip
Fix printing of GCCAsmExprs with input or output arguments.
Patch by Nick Sumner! llvm-svn: 239406
Diffstat (limited to 'clang/lib/AST/StmtPrinter.cpp')
-rw-r--r--clang/lib/AST/StmtPrinter.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/clang/lib/AST/StmtPrinter.cpp b/clang/lib/AST/StmtPrinter.cpp
index cd65d729730..db6d8c231ef 100644
--- a/clang/lib/AST/StmtPrinter.cpp
+++ b/clang/lib/AST/StmtPrinter.cpp
@@ -396,8 +396,9 @@ void StmtPrinter::VisitGCCAsmStmt(GCCAsmStmt *Node) {
}
VisitStringLiteral(Node->getOutputConstraintLiteral(i));
- OS << " ";
+ OS << " (";
Visit(Node->getOutputExpr(i));
+ OS << ")";
}
// Inputs
@@ -415,8 +416,9 @@ void StmtPrinter::VisitGCCAsmStmt(GCCAsmStmt *Node) {
}
VisitStringLiteral(Node->getInputConstraintLiteral(i));
- OS << " ";
+ OS << " (";
Visit(Node->getInputExpr(i));
+ OS << ")";
}
// Clobbers
OpenPOWER on IntegriCloud