[llvm-commits] [llvm] r59570 - /llvm/trunk/lib/Transforms/IPO/StripSymbols.cpp
Devang Patel
dpatel at apple.com
Tue Nov 18 16:22:02 PST 2008
Author: dpatel
Date: Tue Nov 18 18:22:02 2008
New Revision: 59570
URL: http://llvm.org/viewvc/llvm-project?rev=59570&view=rev
Log:
Remove unused variables.
Modified:
llvm/trunk/lib/Transforms/IPO/StripSymbols.cpp
Modified: llvm/trunk/lib/Transforms/IPO/StripSymbols.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/IPO/StripSymbols.cpp?rev=59570&r1=59569&r2=59570&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/IPO/StripSymbols.cpp (original)
+++ llvm/trunk/lib/Transforms/IPO/StripSymbols.cpp Tue Nov 18 18:22:02 2008
@@ -273,18 +273,15 @@
GV->setLinkage(GlobalValue::InternalLinkage);
// Delete all dbg variables.
- const Type *DbgVTy = M.getTypeByName("llvm.dbg.variable.type");
- const Type *DbgGVTy = M.getTypeByName("llvm.dbg.global_variable.type");
- if (DbgVTy || DbgGVTy)
- for (Module::global_iterator I = M.global_begin(), E = M.global_end();
- I != E; ++I) {
- GlobalVariable *GV = dyn_cast<GlobalVariable>(I);
- if (!GV) continue;
- if (GV->use_empty() && llvmUsedValues.count(I) == 0
- && (!GV->hasSection()
- || strcmp(GV->getSection().c_str(), "llvm.metadata") == 0))
- DeadConstants.push_back(GV);
- }
+ for (Module::global_iterator I = M.global_begin(), E = M.global_end();
+ I != E; ++I) {
+ GlobalVariable *GV = dyn_cast<GlobalVariable>(I);
+ if (!GV) continue;
+ if (GV->use_empty() && llvmUsedValues.count(I) == 0
+ && (!GV->hasSection()
+ || strcmp(GV->getSection().c_str(), "llvm.metadata") == 0))
+ DeadConstants.push_back(GV);
+ }
if (DeadConstants.empty())
return false;
More information about the llvm-commits
mailing list