[llvm-commits] [llvm] r50704 - /llvm/branches/non-call-eh/lib/Analysis/CFGPrinter.cpp
Nick Lewycky
nicholas at mxc.ca
Mon May 5 20:59:15 PDT 2008
Author: nicholas
Date: Mon May 5 22:59:15 2008
New Revision: 50704
URL: http://llvm.org/viewvc/llvm-project?rev=50704&view=rev
Log:
Add labels for unwind edges when graphing the CFG.
Modified:
llvm/branches/non-call-eh/lib/Analysis/CFGPrinter.cpp
Modified: llvm/branches/non-call-eh/lib/Analysis/CFGPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/non-call-eh/lib/Analysis/CFGPrinter.cpp?rev=50704&r1=50703&r2=50704&view=diff
==============================================================================
--- llvm/branches/non-call-eh/lib/Analysis/CFGPrinter.cpp (original)
+++ llvm/branches/non-call-eh/lib/Analysis/CFGPrinter.cpp Mon May 5 22:59:15 2008
@@ -80,10 +80,15 @@
static std::string getEdgeSourceLabel(const BasicBlock *Node,
succ_const_iterator I) {
+ // Label unwind edges "EH" for exception handling.
+ if (I.isUnwindEdge())
+ return "EH";
+
// Label source of conditional branches with "T" or "F"
if (const BranchInst *BI = dyn_cast<BranchInst>(Node->getTerminator()))
if (BI->isConditional())
return (I == succ_begin(Node)) ? "T" : "F";
+
return "";
}
};
More information about the llvm-commits
mailing list