diff --git a/llvm/lib/IR/DebugInfo.cpp b/llvm/lib/IR/DebugInfo.cpp index ecb19fd3c82db..d4d8d0376375b 100644 --- a/llvm/lib/IR/DebugInfo.cpp +++ b/llvm/lib/IR/DebugInfo.cpp @@ -376,7 +376,7 @@ bool DebugInfoFinder::addType(DIType *DT) { if (!NodesSeen.insert(DT).second) return false; - TYs.push_back(const_cast(DT)); + TYs.push_back(DT); return true; }