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 | df95a2f6a90d81100972ccf3a22fca4b637806ac (patch) | |
tree | fb4fd9272b076c576315f46bb65a13c6bb64b910 /lib/Transforms/Utils/Local.cpp | |
parent | aa9df0b0c3cef33514095bde2eedead986677955 (diff) | |
download | external_llvm-df95a2f6a90d81100972ccf3a22fca4b637806ac.zip external_llvm-df95a2f6a90d81100972ccf3a22fca4b637806ac.tar.gz external_llvm-df95a2f6a90d81100972ccf3a22fca4b637806ac.tar.bz2 |
Fix a bug.
If I->use_empty(), this method should return false.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67180 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Utils/Local.cpp')
-rw-r--r-- | lib/Transforms/Utils/Local.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/Transforms/Utils/Local.cpp b/lib/Transforms/Utils/Local.cpp index 4be1b87..468136c 100644 --- a/lib/Transforms/Utils/Local.cpp +++ b/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)) { |