diff --git a/include/llvm/Support/GraphWriter.h b/include/llvm/Support/GraphWriter.h index 8e1b0f92faa..ec64f73fe8e 100644 --- a/include/llvm/Support/GraphWriter.h +++ b/include/llvm/Support/GraphWriter.h @@ -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 << "" << DTraits.getEdgeSourceLabel(Node, EI); + O << "" << label; } if (EI != EE && hasEdgeSourceLabels) @@ -235,7 +235,7 @@ public: DestPort = static_cast(Offset); } - if (DTraits.getEdgeSourceLabel(Node, EI) == "") + if (DTraits.getEdgeSourceLabel(Node, EI).empty()) edgeidx = -1; emitEdge(static_cast(Node), edgeidx,