[llvm] r219846 - Wrong attribute. LLVM_ATTRIBUTE_UNUSED not LLVM_ATTRIBUTE_USED

Sid Manning sidneym at codeaurora.org
Wed Oct 15 13:41:17 PDT 2014


Author: sidneym
Date: Wed Oct 15 15:41:17 2014
New Revision: 219846

URL: http://llvm.org/viewvc/llvm-project?rev=219846&view=rev
Log:
Wrong attribute.  LLVM_ATTRIBUTE_UNUSED not LLVM_ATTRIBUTE_USED

This original fix for the build break was correct.  LLVM_ATTRIBUTE_USED
removes the warning message because it keeps the function in the object
file.  LLVM_ATTRIBUTE_UNUSED indicates that it may or may not be used
depending on build settings.

Modified:
    llvm/trunk/lib/Target/Hexagon/InstPrinter/HexagonInstPrinter.cpp

Modified: llvm/trunk/lib/Target/Hexagon/InstPrinter/HexagonInstPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Hexagon/InstPrinter/HexagonInstPrinter.cpp?rev=219846&r1=219845&r2=219846&view=diff
==============================================================================
--- llvm/trunk/lib/Target/Hexagon/InstPrinter/HexagonInstPrinter.cpp (original)
+++ llvm/trunk/lib/Target/Hexagon/InstPrinter/HexagonInstPrinter.cpp Wed Oct 15 15:41:17 2014
@@ -63,7 +63,7 @@ static bool isExtended(uint64_t TSFlags)
 }
 
 // Currently just used in an assert statement
-static bool isExtendable(uint64_t TSFlags) LLVM_ATTRIBUTE_USED;
+static bool isExtendable(uint64_t TSFlags) LLVM_ATTRIBUTE_UNUSED;
 // Return true if the instruction may be extended based on the operand value.
 static bool isExtendable(uint64_t TSFlags) {
   return (TSFlags >> HexagonII::ExtendablePos) & HexagonII::ExtendableMask;





More information about the llvm-commits mailing list