diff options
author | Tyler Nowicki <tnowicki@apple.com> | 2014-06-13 17:57:25 +0000 |
---|---|---|
committer | Tyler Nowicki <tnowicki@apple.com> | 2014-06-13 17:57:25 +0000 |
commit | e8b07ed080ec11a32de21ac1af5da2bbf3d62281 (patch) | |
tree | 045fab6b3187928cd890df382d63772808600c92 /clang/lib/AST/StmtPrinter.cpp | |
parent | e595e1ade02c7581a2e2ad5392f7714b7f342c05 (diff) | |
download | bcm5719-llvm-e8b07ed080ec11a32de21ac1af5da2bbf3d62281.tar.gz bcm5719-llvm-e8b07ed080ec11a32de21ac1af5da2bbf3d62281.zip |
Adds a Pragma spelling for attributes to tablegen and makes use of it for loop
hint attributes. Includes tests for pragma printing and for attribute order
which is incorrectly reversed by ParsedAttributes.
Reviewed by Aaron Ballman
llvm-svn: 210925
Diffstat (limited to 'clang/lib/AST/StmtPrinter.cpp')
-rw-r--r-- | clang/lib/AST/StmtPrinter.cpp | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/clang/lib/AST/StmtPrinter.cpp b/clang/lib/AST/StmtPrinter.cpp index 06514056185..cd206965fb8 100644 --- a/clang/lib/AST/StmtPrinter.cpp +++ b/clang/lib/AST/StmtPrinter.cpp @@ -168,21 +168,9 @@ void StmtPrinter::VisitLabelStmt(LabelStmt *Node) { } void StmtPrinter::VisitAttributedStmt(AttributedStmt *Node) { - std::string raw_attr_os; - llvm::raw_string_ostream AttrOS(raw_attr_os); for (const auto *Attr : Node->getAttrs()) { - // FIXME: This hack will be removed when printPretty - // has been modified to print pretty pragmas - if (const LoopHintAttr *LHA = dyn_cast<LoopHintAttr>(Attr)) { - LHA->print(OS, Policy); - } else - Attr->printPretty(AttrOS, Policy); - } - - // Print attributes after pragmas. - StringRef AttrStr = AttrOS.str(); - if (!AttrStr.empty()) - OS << AttrStr; + Attr->printPretty(OS, Policy); + } PrintStmt(Node->getSubStmt(), 0); } |