[PATCH] D158341: [llvm][NFC] AutoUpgrade case 'd'
Nathan Sidwell via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Aug 19 11:05:30 PDT 2023
urnathan created this revision.
urnathan added reviewers: arsenm, nikic.
Herald added subscribers: StephenFan, hiraditya.
Herald added a project: All.
urnathan requested review of this revision.
Herald added subscribers: llvm-commits, wdng.
Herald added a project: LLVM.
Continuing refactor of the AutoUpgrader, here's a simple update of `case 'd':`. Consume the `dbg.` prefix before looking further. Also merge the matched path.
https://reviews.llvm.org/D158341
Files:
llvm/lib/IR/AutoUpgrade.cpp
Index: llvm/lib/IR/AutoUpgrade.cpp
===================================================================
--- llvm/lib/IR/AutoUpgrade.cpp
+++ 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.startswith("experimental.vector.extract.")) {
rename(F);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D158341.551774.patch
Type: text/x-patch
Size: 964 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230819/ee50bc11/attachment.bin>
More information about the llvm-commits
mailing list