summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2004-05-28 05:30:51 +0000
committerChris Lattner <sabre@nondot.org>2004-05-28 05:30:51 +0000
commitc7e2ff298011dc889628c268e4571e84af898aac (patch)
tree9928812ebf6e6423e34c86ca5b21e243b9210c27 /llvm/lib
parent5b7b6bbd38af7650ae4b948c2b5ddd082be4a983 (diff)
downloadbcm5719-llvm-c7e2ff298011dc889628c268e4571e84af898aac.tar.gz
bcm5719-llvm-c7e2ff298011dc889628c268e4571e84af898aac.zip
Minor changes. Switch to a SymbolTable remove that does not take linear time
llvm-svn: 13874
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Target/CBackend/Writer.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Target/CBackend/Writer.cpp b/llvm/lib/Target/CBackend/Writer.cpp
index 491b3484119..4284dcc8c0d 100644
--- a/llvm/lib/Target/CBackend/Writer.cpp
+++ b/llvm/lib/Target/CBackend/Writer.cpp
@@ -226,7 +226,7 @@ bool CBackendNameAllUsedStructs::run(Module &M) {
// If this is not used, remove it from the symbol table.
std::set<const Type *>::iterator UTI = UT.find(STy);
if (UTI == UT.end())
- MST.remove(I->first, (Type*)I->second);
+ MST.remove(I);
else
UT.erase(UTI);
}
@@ -239,7 +239,7 @@ bool CBackendNameAllUsedStructs::run(Module &M) {
for (std::set<const Type *>::const_iterator I = UT.begin(), E = UT.end();
I != E; ++I)
if (const StructType *ST = dyn_cast<StructType>(*I)) {
- ((Value*)ST)->setName("unnamed", &MST);
+ const_cast<StructType*>(ST)->setName("unnamed", &MST);
Changed = true;
}
return Changed;
OpenPOWER on IntegriCloud