diff --git a/llvm/lib/IR/AutoUpgrade.cpp b/llvm/lib/IR/AutoUpgrade.cpp --- a/llvm/lib/IR/AutoUpgrade.cpp +++ b/llvm/lib/IR/AutoUpgrade.cpp @@ -930,19 +930,16 @@ } break; } - case 'd': { - if (Name == "dbg.addr") { - rename(F); - NewFn = Intrinsic::getDeclaration(F->getParent(), Intrinsic::dbg_value); - return true; - } - if (Name == "dbg.value" && F->arg_size() == 4) { - rename(F); - NewFn = Intrinsic::getDeclaration(F->getParent(), Intrinsic::dbg_value); - return true; + case 'd': + if (Name.consume_front("dbg.")) { + if (Name == "addr" || (Name == "value" && F->arg_size() == 4)) { + rename(F); + NewFn = Intrinsic::getDeclaration(F->getParent(), Intrinsic::dbg_value); + return true; + } + break; // No other 'dbg.*'. } break; - } case 'e': if (Name.consume_front("experimental.vector.")) { Intrinsic::ID ID = StringSwitch(Name)