From 221d688a5ef21a22c2368c9fff0e92d7966c95e5 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Tue, 12 Feb 2002 21:07:25 +0000 Subject: Method.h no longer includes BasicBlock.h Method::inst_* is now in llvm/Support/InstIterator.h GraphTraits specializations for BasicBlock and Methods are now in llvm/Support/CFG.h git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1746 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/ExecutionEngine/Interpreter/Execution.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'lib/ExecutionEngine/Interpreter/Execution.cpp') diff --git a/lib/ExecutionEngine/Interpreter/Execution.cpp b/lib/ExecutionEngine/Interpreter/Execution.cpp index 0fad82964d..9f6317fd39 100644 --- a/lib/ExecutionEngine/Interpreter/Execution.cpp +++ b/lib/ExecutionEngine/Interpreter/Execution.cpp @@ -1034,10 +1034,12 @@ MethodInfo::MethodInfo(Method *M) : Annotation(MethodInfoAID) { // Iterate over all of the instructions... unsigned InstNum = 0; - for (Method::inst_iterator MI = M->inst_begin(), ME = M->inst_end(); - MI != ME; ++MI) { - Instruction *I = *MI; // For each instruction... - I->addAnnotation(new InstNumber(++InstNum, getValueSlot(I))); // Add Annote + for (Method::iterator MI = M->begin(), ME = M->end(); MI != ME; ++MI) { + BasicBlock *BB = *MI; + for (BasicBlock::iterator II = BB->begin(), IE = BB->end(); II != IE; ++II){ + Instruction *I = *II; // For each instruction... Add Annote + I->addAnnotation(new InstNumber(++InstNum, getValueSlot(I))); + } } } -- cgit v1.2.3-70-g09d2