[llvm-commits] [llvm] r126786 - /llvm/trunk/include/llvm/Support/GraphWriter.h
Dan Gohman
gohman at apple.com
Tue Mar 1 14:07:55 PST 2011
Author: djg
Date: Tue Mar 1 16:07:55 2011
New Revision: 126786
URL: http://llvm.org/viewvc/llvm-project?rev=126786&view=rev
Log:
Code simplification.
Modified:
llvm/trunk/include/llvm/Support/GraphWriter.h
Modified: llvm/trunk/include/llvm/Support/GraphWriter.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/GraphWriter.h?rev=126786&r1=126785&r2=126786&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Support/GraphWriter.h (original)
+++ llvm/trunk/include/llvm/Support/GraphWriter.h Tue Mar 1 16:07:55 2011
@@ -70,7 +70,7 @@
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 @@
if (i)
O << "|";
- O << "<s" << i << ">" << DTraits.getEdgeSourceLabel(Node, EI);
+ O << "<s" << i << ">" << label;
}
if (EI != EE && hasEdgeSourceLabels)
@@ -235,7 +235,7 @@
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,
More information about the llvm-commits
mailing list