X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=include%2Fllvm%2FSupport%2FCFG.h;h=f5dc8ea055a37e064f4f0776714a2fe887f4ea9e;hb=cbeb8d9869aafec3c2c1ee0922f0a4d5bb4a916a;hp=29313ef900994b5d9566f8923e467f625680e84d;hpb=598179ee2f5a31d4b2d3932963a3714ab235ec2e;p=oota-llvm.git diff --git a/include/llvm/Support/CFG.h b/include/llvm/Support/CFG.h index 29313ef9009..f5dc8ea055a 100644 --- a/include/llvm/Support/CFG.h +++ b/include/llvm/Support/CFG.h @@ -71,6 +71,12 @@ public: unsigned getOperandNo() const { return It.getOperandNo(); } + + /// getUse - Return the operand Use in the predecessor's terminator + /// of the successor. + Use &getUse() const { + return It.getUse(); + } }; typedef PredIterator pred_iterator; @@ -314,6 +320,7 @@ template <> struct GraphTraits : public GraphTraits { typedef Function::iterator nodes_iterator; static nodes_iterator nodes_begin(Function *F) { return F->begin(); } static nodes_iterator nodes_end (Function *F) { return F->end(); } + static unsigned size (Function *F) { return F->size(); } }; template <> struct GraphTraits : public GraphTraits { @@ -323,6 +330,7 @@ template <> struct GraphTraits : typedef Function::const_iterator nodes_iterator; static nodes_iterator nodes_begin(const Function *F) { return F->begin(); } static nodes_iterator nodes_end (const Function *F) { return F->end(); } + static unsigned size (const Function *F) { return F->size(); } };