diff options
| author | Dan Gohman <gohman@apple.com> | 2008-05-23 21:05:58 +0000 |
|---|---|---|
| committer | Dan Gohman <gohman@apple.com> | 2008-05-23 21:05:58 +0000 |
| commit | f96e1371e85a5b6be0d787f56e5882e7b63eefc7 (patch) | |
| tree | db75aafa57099ddbeac35a41a9b9250a1b89fb2e /llvm/lib/Transforms/Utils/LowerInvoke.cpp | |
| parent | c11802a521b48dc3626fcaac3ff73f5847acd33e (diff) | |
| download | bcm5719-llvm-f96e1371e85a5b6be0d787f56e5882e7b63eefc7.tar.gz bcm5719-llvm-f96e1371e85a5b6be0d787f56e5882e7b63eefc7.zip | |
Tidy up BasicBlock::getFirstNonPHI, and change a bunch of places to
use it instead of duplicating its functionality.
llvm-svn: 51499
Diffstat (limited to 'llvm/lib/Transforms/Utils/LowerInvoke.cpp')
| -rw-r--r-- | llvm/lib/Transforms/Utils/LowerInvoke.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/llvm/lib/Transforms/Utils/LowerInvoke.cpp b/llvm/lib/Transforms/Utils/LowerInvoke.cpp index 4b7e3a3314b..0f86765a70d 100644 --- a/llvm/lib/Transforms/Utils/LowerInvoke.cpp +++ b/llvm/lib/Transforms/Utils/LowerInvoke.cpp @@ -282,8 +282,7 @@ void LowerInvoke::rewriteExpensiveInvoke(InvokeInst *II, unsigned InvokeNo, // location afterward. new StoreInst(InvokeNoC, InvokeNum, true, II); // volatile - BasicBlock::iterator NI = II->getNormalDest()->begin(); - while (isa<PHINode>(NI)) ++NI; + BasicBlock::iterator NI = II->getNormalDest()->getFirstNonPHI(); // nonvolatile. new StoreInst(Constant::getNullValue(Type::Int32Ty), InvokeNum, false, NI); |

