diff options
| author | Dan Gohman <gohman@apple.com> | 2010-04-19 15:42:05 +0000 | 
|---|---|---|
| committer | Dan Gohman <gohman@apple.com> | 2010-04-19 15:42:05 +0000 | 
| commit | dfd4bbfdfba518f194f4795dfc963dfa456d0246 (patch) | |
| tree | ac3d9e425ec917c296234a5a9a2a2a2550969291 /lib/VMCore | |
| parent | 5af8f421b6412e52530608097e39d2602195629f (diff) | |
| download | external_llvm-dfd4bbfdfba518f194f4795dfc963dfa456d0246.zip external_llvm-dfd4bbfdfba518f194f4795dfc963dfa456d0246.tar.gz external_llvm-dfd4bbfdfba518f194f4795dfc963dfa456d0246.tar.bz2 | |
Fix -Wcast-qual warnings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101779 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore')
| -rw-r--r-- | lib/VMCore/TypeSymbolTable.cpp | 6 | 
1 files changed, 4 insertions, 2 deletions
| diff --git a/lib/VMCore/TypeSymbolTable.cpp b/lib/VMCore/TypeSymbolTable.cpp index b4daf0f..d68a44b 100644 --- a/lib/VMCore/TypeSymbolTable.cpp +++ b/lib/VMCore/TypeSymbolTable.cpp @@ -126,13 +126,15 @@ void TypeSymbolTable::refineAbstractType(const DerivedType *OldType,    // faster to remove them all in one pass.    //    for (iterator I = begin(), E = end(); I != E; ++I) { -    if (I->second == (Type*)OldType) {  // FIXME when Types aren't const. +    // FIXME when Types aren't const. +    if (I->second == const_cast<DerivedType *>(OldType)) {  #if DEBUG_ABSTYPE        dbgs() << "Removing type " << OldType->getDescription() << "\n";  #endif        OldType->removeAbstractTypeUser(this); -      I->second = (Type*)NewType;  // TODO FIXME when types aren't const +      // TODO FIXME when types aren't const +      I->second = const_cast<Type *>(NewType);        if (NewType->isAbstract()) {  #if DEBUG_ABSTYPE          dbgs() << "Added type " << NewType->getDescription() << "\n"; | 
