[llvm] 2b5595b - [IR] Remove variants of dropUnknownNonDebugMetadata (#98854)
via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 15 04:07:40 PDT 2024
Author: Kazu Hirata
Date: 2024-07-15T04:07:36-07:00
New Revision: 2b5595b06c0b7fff4a8dd768612b9a52727c38ab
URL: https://github.com/llvm/llvm-project/commit/2b5595b06c0b7fff4a8dd768612b9a52727c38ab
DIFF: https://github.com/llvm/llvm-project/commit/2b5595b06c0b7fff4a8dd768612b9a52727c38ab.diff
LOG: [IR] Remove variants of dropUnknownNonDebugMetadata (#98854)
This patch removes:
- dropUnknownNonDebugMetadata()
- dropUnknownNonDebugMetadata(ID1)
- dropUnknownNonDebugMetadata(ID1, ID2)
The first variant has existing uses, but we can accommodate those by
adding a default parameter to the main variant.
The second and third variant do not have any existing use AFAICT.
Added:
Modified:
llvm/include/llvm/IR/Instruction.h
Removed:
################################################################################
diff --git a/llvm/include/llvm/IR/Instruction.h b/llvm/include/llvm/IR/Instruction.h
index 7a9b95f23465c..c27572300d506 100644
--- a/llvm/include/llvm/IR/Instruction.h
+++ b/llvm/include/llvm/IR/Instruction.h
@@ -433,17 +433,7 @@ class Instruction : public User,
/// convenience method for passes to do so.
/// dropUBImplyingAttrsAndUnknownMetadata should be used instead of
/// this API if the Instruction being modified is a call.
- void dropUnknownNonDebugMetadata(ArrayRef<unsigned> KnownIDs);
- void dropUnknownNonDebugMetadata() {
- return dropUnknownNonDebugMetadata(std::nullopt);
- }
- void dropUnknownNonDebugMetadata(unsigned ID1) {
- return dropUnknownNonDebugMetadata(ArrayRef(ID1));
- }
- void dropUnknownNonDebugMetadata(unsigned ID1, unsigned ID2) {
- unsigned IDs[] = {ID1, ID2};
- return dropUnknownNonDebugMetadata(IDs);
- }
+ void dropUnknownNonDebugMetadata(ArrayRef<unsigned> KnownIDs = std::nullopt);
/// @}
/// Adds an !annotation metadata node with \p Annotation to this instruction.
More information about the llvm-commits
mailing list