Code simplification.
authorDan Gohman <gohman@apple.com>
Tue, 1 Mar 2011 22:07:55 +0000 (22:07 +0000)
committerDan Gohman <gohman@apple.com>
Tue, 1 Mar 2011 22:07:55 +0000 (22:07 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126786 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/Support/GraphWriter.h

index 8e1b0f92faa48dc4025dac074a8a2b0ff6d1d7ab..ec64f73fe8ebd0a0c36c3b9faeae0909f4f0e1ae 100644 (file)
@@ -70,7 +70,7 @@ class GraphWriter {
     for (unsigned i = 0; EI != EE && i != 64; ++EI, ++i) {
       std::string label = DTraits.getEdgeSourceLabel(Node, EI);
 
-      if (label == "")
+      if (label.empty())
         continue;
 
       hasEdgeSourceLabels = true;
@@ -78,7 +78,7 @@ class GraphWriter {
       if (i)
         O << "|";
 
-      O << "<s" << i << ">" << DTraits.getEdgeSourceLabel(Node, EI);
+      O << "<s" << i << ">" << label;
     }
 
     if (EI != EE && hasEdgeSourceLabels)
@@ -235,7 +235,7 @@ public:
         DestPort = static_cast<int>(Offset);
       }
 
-      if (DTraits.getEdgeSourceLabel(Node, EI) == "")
+      if (DTraits.getEdgeSourceLabel(Node, EI).empty())
         edgeidx = -1;
 
       emitEdge(static_cast<const void*>(Node), edgeidx,