[PATCH] D121955: [clang] NFC: Dead code removal in SemaDecl.cpp, CheckMultiVersionFunction().
Tom Honermann via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Mar 17 14:44:37 PDT 2022
tahonermann created this revision.
tahonermann added reviewers: erichkeane, aaron.ballman.
Herald added a project: All.
tahonermann published this revision for review.
tahonermann added inline comments.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.
================
Comment at: clang/lib/Sema/SemaDecl.cpp:10919-10921
return CheckTargetCausesMultiVersioning(S, OldFD, NewFD, NewTA,
Redeclaration, OldDecl,
MergeTypeWithPrevious, Previous);
----------------
These lines are what makes the removed code dead code.
This change removes dead code in the definition of CheckMultiVersionFunction()
in clang/lib/Sema/SemaDecl.cpp. The removed code was made dead by commit
fc53eb69c26cdd7efa6b629c187d04326f0448ca <https://reviews.llvm.org/rGfc53eb69c26cdd7efa6b629c187d04326f0448ca>: "Reapply 'Implement target_clones multiversioning'".
See the added code just above the code being deleted; it contains the same
return statement with the previous condition now distributed across an if
statement and a switch statement.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D121955
Files:
clang/lib/Sema/SemaDecl.cpp
Index: clang/lib/Sema/SemaDecl.cpp
===================================================================
--- clang/lib/Sema/SemaDecl.cpp
+++ clang/lib/Sema/SemaDecl.cpp
@@ -10932,11 +10932,6 @@
break;
}
}
- // Handle the target potentially causes multiversioning case.
- if (!OldFD->isMultiVersion() && MVType == MultiVersionKind::Target)
- return CheckTargetCausesMultiVersioning(S, OldFD, NewFD, NewTA,
- Redeclaration, OldDecl,
- MergeTypeWithPrevious, Previous);
// At this point, we have a multiversion function decl (in OldFD) AND an
// appropriate attribute in the current function decl. Resolve that these are
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D121955.416321.patch
Type: text/x-patch
Size: 731 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220317/be0eb8c3/attachment.bin>
More information about the cfe-commits
mailing list