diff options
author | Zhou Sheng <zhousheng00@gmail.com> | 2009-03-18 07:56:13 +0000 |
---|---|---|
committer | Zhou Sheng <zhousheng00@gmail.com> | 2009-03-18 07:56:13 +0000 |
commit | 64a6a092b1f13a7d7aee9fbe143f0d9c5ce891b5 (patch) | |
tree | f51f775316867b72ba9862169f86f8e757489014 /llvm/lib/Transforms/Utils/Local.cpp | |
parent | 04c4c2c3db48fbc43542c5609f27f163ae798469 (diff) | |
download | bcm5719-llvm-64a6a092b1f13a7d7aee9fbe143f0d9c5ce891b5.tar.gz bcm5719-llvm-64a6a092b1f13a7d7aee9fbe143f0d9c5ce891b5.zip |
Fix a bug.
If I->use_empty(), this method should return false.
llvm-svn: 67180
Diffstat (limited to 'llvm/lib/Transforms/Utils/Local.cpp')
-rw-r--r-- | llvm/lib/Transforms/Utils/Local.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/lib/Transforms/Utils/Local.cpp b/llvm/lib/Transforms/Utils/Local.cpp index 4be1b8717d2..468136c9968 100644 --- a/llvm/lib/Transforms/Utils/Local.cpp +++ b/llvm/lib/Transforms/Utils/Local.cpp @@ -262,6 +262,9 @@ bool llvm::OnlyUsedByDbgInfoIntrinsics(Instruction *I, if (DbgInUses) DbgInUses->clear(); + if (I->use_empty()) + return false; + for (Value::use_iterator UI = I->use_begin(), UE = I->use_end(); UI != UE; ++UI) { if (DbgInfoIntrinsic *DI = dyn_cast<DbgInfoIntrinsic>(*UI)) { |