[lld] r192943 - Fix -Wunused-function warning of release build.

Rui Ueyama ruiu at google.com
Thu Oct 17 20:18:54 PDT 2013


Author: ruiu
Date: Thu Oct 17 22:18:54 2013
New Revision: 192943

URL: http://llvm.org/viewvc/llvm-project?rev=192943&view=rev
Log:
Fix -Wunused-function warning of release build.

Modified:
    lld/trunk/lib/Passes/LayoutPass.cpp

Modified: lld/trunk/lib/Passes/LayoutPass.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/Passes/LayoutPass.cpp?rev=192943&r1=192942&r2=192943&view=diff
==============================================================================
--- lld/trunk/lib/Passes/LayoutPass.cpp (original)
+++ lld/trunk/lib/Passes/LayoutPass.cpp Thu Oct 17 22:18:54 2013
@@ -20,6 +20,7 @@
 
 using namespace lld;
 
+#ifndef NDEBUG
 namespace {
 // Return "reason (leftval, rightval)"
 std::string formatReason(StringRef reason, int leftVal, int rightVal) {
@@ -28,6 +29,7 @@ std::string formatReason(StringRef reaso
   return std::move(msg.str());
 }
 }
+#endif // NDEBUG
 
 /// The function compares atoms by sorting atoms in the following order
 /// a) Sorts atoms by Section position preference





More information about the llvm-commits mailing list