Simplify LLVM_ATTRIBUTE_USED call sites.
authorFangrui Song <maskray@google.com>
Sat, 5 May 2018 20:14:38 +0000 (20:14 +0000)
committerFangrui Song <maskray@google.com>
Sat, 5 May 2018 20:14:38 +0000 (20:14 +0000)
llvm-svn: 331599

llvm/lib/Support/Signals.cpp
llvm/lib/Target/Hexagon/HexagonLoopIdiomRecognition.cpp
llvm/lib/Transforms/Utils/LowerSwitch.cpp

index cdf2d86b7f6865c9c53c38017258dcf8df04a5df..414619bc3c9c6a83d3c8bdde689bd9308a46e1e3 100644 (file)
@@ -64,15 +64,10 @@ static FormattedNumber format_ptr(void *PC) {
   return format_hex((uint64_t)PC, PtrWidth);
 }
 
-static bool printSymbolizedStackTrace(StringRef Argv0,
-                                      void **StackTrace, int Depth,
-                                      llvm::raw_ostream &OS)
-  LLVM_ATTRIBUTE_USED;
-
 /// Helper that launches llvm-symbolizer and symbolizes a backtrace.
-static bool printSymbolizedStackTrace(StringRef Argv0,
-                                      void **StackTrace, int Depth,
-                                      llvm::raw_ostream &OS) {
+LLVM_ATTRIBUTE_USED
+static bool printSymbolizedStackTrace(StringRef Argv0, void **StackTrace,
+                                      int Depth, llvm::raw_ostream &OS) {
   if (DisableSymbolication)
     return false;
 
index 625e2e935107a4732d0b74a57fc087595e3454b4..d0bc2ed83a76bb469eff814e19f828cb2e445c6c 100644 (file)
@@ -244,8 +244,8 @@ namespace {
     const Value *V;
   };
 
-  raw_ostream &operator<< (raw_ostream &OS, const PE &P) LLVM_ATTRIBUTE_USED;
-  raw_ostream &operator<< (raw_ostream &OS, const PE &P) {
+  LLVM_ATTRIBUTE_USED
+  raw_ostream &operator<<(raw_ostream &OS, const PE &P) {
     P.C.print(OS, P.V ? P.V : P.C.Root);
     return OS;
   }
index efdc04a8d7df9b34b22d5acce3f2a245e81b66f4..8643ad8cb00edd3cb0cd40f67c81463098db427a 100644 (file)
@@ -155,11 +155,8 @@ bool LowerSwitch::runOnFunction(Function &F) {
 }
 
 /// Used for debugging purposes.
-static raw_ostream& operator<<(raw_ostream &O,
-                               const LowerSwitch::CaseVector &C)
-    LLVM_ATTRIBUTE_USED;
-
-static raw_ostream& operator<<(raw_ostream &O,
+LLVM_ATTRIBUTE_USED
+static raw_ostream &operator<<(raw_ostream &O,
                                const LowerSwitch::CaseVector &C) {
   O << "[";