diff options
author | Stepan Dyatkovskiy <stpworld@narod.ru> | 2012-03-11 06:09:17 +0000 |
---|---|---|
committer | Stepan Dyatkovskiy <stpworld@narod.ru> | 2012-03-11 06:09:17 +0000 |
commit | 97b02fc1b3d27e0d86cb1203aff77a3104f1a793 (patch) | |
tree | 15178ecabb9dd7ac643776849a3e1f226afeff0d /llvm/lib/Transforms/Utils/Local.cpp | |
parent | fdd417fceed5acd610af14c3fc0621e3c9e1b1b9 (diff) | |
download | bcm5719-llvm-97b02fc1b3d27e0d86cb1203aff77a3104f1a793.tar.gz bcm5719-llvm-97b02fc1b3d27e0d86cb1203aff77a3104f1a793.zip |
llvm::SwitchInst
Renamed methods caseBegin, caseEnd and caseDefault with case_begin, case_end, and case_default.
Added some notes relative to case iterators.
llvm-svn: 152532
Diffstat (limited to 'llvm/lib/Transforms/Utils/Local.cpp')
-rw-r--r-- | llvm/lib/Transforms/Utils/Local.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Transforms/Utils/Local.cpp b/llvm/lib/Transforms/Utils/Local.cpp index 6ea3b935757..5f895eb68ba 100644 --- a/llvm/lib/Transforms/Utils/Local.cpp +++ b/llvm/lib/Transforms/Utils/Local.cpp @@ -110,7 +110,7 @@ bool llvm::ConstantFoldTerminator(BasicBlock *BB, bool DeleteDeadConditions) { BasicBlock *DefaultDest = TheOnlyDest; // Figure out which case it goes to. - for (SwitchInst::CaseIt i = SI->caseBegin(), e = SI->caseEnd(); + for (SwitchInst::CaseIt i = SI->case_begin(), e = SI->case_end(); i != e; ++i) { // Found case matching a constant operand? if (i.getCaseValue() == CI) { @@ -168,7 +168,7 @@ bool llvm::ConstantFoldTerminator(BasicBlock *BB, bool DeleteDeadConditions) { if (SI->getNumCases() == 1) { // Otherwise, we can fold this switch into a conditional branch // instruction if it has only one non-default destination. - SwitchInst::CaseIt FirstCase = SI->caseBegin(); + SwitchInst::CaseIt FirstCase = SI->case_begin(); Value *Cond = Builder.CreateICmpEQ(SI->getCondition(), FirstCase.getCaseValue(), "cond"); |