OSDN Git Service

Fix unused variable warning by folding the temporary into the debug statement.
authorEric Christopher <echristo@gmail.com>
Thu, 23 Jun 2016 00:42:00 +0000 (00:42 +0000)
committerEric Christopher <echristo@gmail.com>
Thu, 23 Jun 2016 00:42:00 +0000 (00:42 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273523 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Transforms/Scalar/RewriteStatepointsForGC.cpp

index cb05a60..e85423f 100644 (file)
@@ -1017,9 +1017,9 @@ static Value *findBasePointer(Value *I, DefiningValueMapTy &cache) {
     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)) {