Author: gbtozers Date: 2020-01-15T15:51:22Z New Revision: 3191fa21be09d6e7352751f86626a2e8fb251555
URL: https://github.com/llvm/llvm-project/commit/3191fa21be09d6e7352751f86626a2e8fb251555 DIFF: https://github.com/llvm/llvm-project/commit/3191fa21be09d6e7352751f86626a2e8fb251555.diff LOG: Use isa<UndefValue> where needed Added: Modified: llvm/lib/Transforms/Utils/BasicBlockUtils.cpp Removed: ################################################################################ diff --git a/llvm/lib/Transforms/Utils/BasicBlockUtils.cpp b/llvm/lib/Transforms/Utils/BasicBlockUtils.cpp index 5bae1e8eb7ef..9d703d2ab7db 100644 --- a/llvm/lib/Transforms/Utils/BasicBlockUtils.cpp +++ b/llvm/lib/Transforms/Utils/BasicBlockUtils.cpp @@ -326,7 +326,7 @@ bool llvm::RemovePureUndefDbgInstrs(Function &F) { DVI->getDebugLoc()->getInlinedAt()); if (NonUndefVariables.count(Key)) continue; - if (DVI->getValue() == UndefValue::get(DVI->getValue()->getType())) { + if (isa<UndefValue>(DVI->getValue())) { auto R = UndefVariableMap.insert( {Key, SmallVector<DbgValueInst *, 8>(1, DVI)}); if (!R.second) { _______________________________________________ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits