summaryrefslogtreecommitdiff
path: root/lib/Transforms/IPO
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2011-07-09 17:59:15 +0000
committerChris Lattner <sabre@nondot.org>2011-07-09 17:59:15 +0000
commitaca50a94b8d4863adf07eec980b83599c541ed99 (patch)
treef66ecabbce2895eba5867c9668c12209306f7a21 /lib/Transforms/IPO
parent1afcace3a3a138b1b18e5c6270caa8dae2261ae2 (diff)
downloadllvm-aca50a94b8d4863adf07eec980b83599c541ed99.tar.gz
llvm-aca50a94b8d4863adf07eec980b83599c541ed99.tar.bz2
llvm-aca50a94b8d4863adf07eec980b83599c541ed99.tar.xz
remove the DerivedType which isn't adding value anymore.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@134832 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/IPO')
-rw-r--r--lib/Transforms/IPO/StripSymbols.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/Transforms/IPO/StripSymbols.cpp b/lib/Transforms/IPO/StripSymbols.cpp
index 5bacdf57fc..0fbaff1509 100644
--- a/lib/Transforms/IPO/StripSymbols.cpp
+++ b/lib/Transforms/IPO/StripSymbols.cpp
@@ -143,8 +143,7 @@ static void RemoveDeadConstant(Constant *C) {
assert(C->use_empty() && "Constant is not dead!");
SmallPtrSet<Constant*, 4> Operands;
for (unsigned i = 0, e = C->getNumOperands(); i != e; ++i)
- if (isa<DerivedType>(C->getOperand(i)->getType()) &&
- OnlyUsedBy(C->getOperand(i), C))
+ if (OnlyUsedBy(C->getOperand(i), C))
Operands.insert(cast<Constant>(C->getOperand(i)));
if (GlobalVariable *GV = dyn_cast<GlobalVariable>(C)) {
if (!GV->hasLocalLinkage()) return; // Don't delete non static globals.