[PATCH] D70136: Reduce unneeded function call and save to NeedSpace variable
Seija Kijin via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 12 11:42:00 PST 2019
pi1024e created this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
Repository:
rL LLVM
https://reviews.llvm.org/D70136
Files:
New.cpp
Index: New.cpp
===================================================================
--- New.cpp
+++ New.cpp
@@ -72,7 +72,11 @@
size_t Pos1 = OS.getCurrentPosition();
SpaceBefore = outputQualifierIfPresent(OS, Q, Q_Const, SpaceBefore);
SpaceBefore = outputQualifierIfPresent(OS, Q, Q_Volatile, SpaceBefore);
- SpaceBefore = outputQualifierIfPresent(OS, Q, Q_Restrict, SpaceBefore);
+ if (Q & Mask){
+ if (NeedSpace)
+ OS << " ";
+ outputSingleQualifier(OS, Mask)
+ }
size_t Pos2 = OS.getCurrentPosition();
if (SpaceAfter && Pos2 > Pos1)
OS << " ";
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D70136.228929.patch
Type: text/x-patch
Size: 598 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20191112/5b80069e/attachment.bin>
More information about the llvm-commits
mailing list