diff --git a/lib/Target/CBackend/CBackend.cpp b/lib/Target/CBackend/CBackend.cpp index dd133c9cbf9..491b3484119 100644 --- a/lib/Target/CBackend/CBackend.cpp +++ b/lib/Target/CBackend/CBackend.cpp @@ -226,7 +226,7 @@ bool CBackendNameAllUsedStructs::run(Module &M) { // If this is not used, remove it from the symbol table. std::set::iterator UTI = UT.find(STy); if (UTI == UT.end()) - MST.remove(I->first, I->second); + MST.remove(I->first, (Type*)I->second); else UT.erase(UTI); } diff --git a/lib/Target/CBackend/Writer.cpp b/lib/Target/CBackend/Writer.cpp index dd133c9cbf9..491b3484119 100644 --- a/lib/Target/CBackend/Writer.cpp +++ b/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::iterator UTI = UT.find(STy); if (UTI == UT.end()) - MST.remove(I->first, I->second); + MST.remove(I->first, (Type*)I->second); else UT.erase(UTI); }