[llvm] r273523 - Fix unused variable warning by folding the temporary into the debug statement.

Eric Christopher via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 22 17:42:00 PDT 2016


Author: echristo
Date: Wed Jun 22 19:42:00 2016
New Revision: 273523

URL: http://llvm.org/viewvc/llvm-project?rev=273523&view=rev
Log:
Fix unused variable warning by folding the temporary into the debug statement.

Modified:
    llvm/trunk/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp

Modified: llvm/trunk/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp?rev=273523&r1=273522&r2=273523&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp Wed Jun 22 19:42:00 2016
@@ -1017,9 +1017,9 @@ static Value *findBasePointer(Value *I,
     assert(BDV && base);
     assert(!isKnownBaseResult(BDV) && "why did it get added?");
 
-    StringRef FromStr = cache.count(BDV) ? cache[BDV]->getName() : "none";
     DEBUG(dbgs() << "Updating base value cache"
-                 << " for: " << BDV->getName() << " from: " << FromStr
+                 << " for: " << BDV->getName() << " from: "
+                 << (cache.count(BDV) ? cache[BDV]->getName().str() : "none")
                  << " to: " << base->getName() << "\n");
 
     if (cache.count(BDV)) {




More information about the llvm-commits mailing list