diff options
author | Reid Spencer <rspencer@reidspencer.com> | 2004-07-18 00:18:30 +0000 |
---|---|---|
committer | Reid Spencer <rspencer@reidspencer.com> | 2004-07-18 00:18:30 +0000 |
commit | e840434755e2165ac20ec55e9d5ff3d2defac2d2 (patch) | |
tree | 546353c849d6137556b5dfb7e90d317a7c37b42c /lib/Analysis/IPA/FindUsedTypes.cpp | |
parent | e0125b678539029091e70695cf4219ec2c297a25 (diff) | |
download | llvm-e840434755e2165ac20ec55e9d5ff3d2defac2d2.tar.gz llvm-e840434755e2165ac20ec55e9d5ff3d2defac2d2.tar.bz2 llvm-e840434755e2165ac20ec55e9d5ff3d2defac2d2.tar.xz |
bug 122:
- Replace ConstantPointerRef usage with GlobalValue usage
- Minimize redundant isa<GlobalValue> usage
- Correct isa<Constant> for GlobalValue subclass
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14942 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/IPA/FindUsedTypes.cpp')
-rw-r--r-- | lib/Analysis/IPA/FindUsedTypes.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/Analysis/IPA/FindUsedTypes.cpp b/lib/Analysis/IPA/FindUsedTypes.cpp index a8527772fa..1f127fe82d 100644 --- a/lib/Analysis/IPA/FindUsedTypes.cpp +++ b/lib/Analysis/IPA/FindUsedTypes.cpp @@ -48,9 +48,10 @@ void FindUsedTypes::IncorporateValue(const Value *V) { // If this is a constant, it could be using other types... if (const Constant *C = dyn_cast<Constant>(V)) { - for (User::const_op_iterator OI = C->op_begin(), OE = C->op_end(); - OI != OE; ++OI) - IncorporateValue(*OI); + if (!isa<GlobalValue>(C)) + for (User::const_op_iterator OI = C->op_begin(), OE = C->op_end(); + OI != OE; ++OI) + IncorporateValue(*OI); } } |