[llvm] [IR] Remove variants of dropUnknownNonDebugMetadata (PR #98854)
via llvm-commits
llvm-commits at lists.llvm.org
Sun Jul 14 19:49:35 PDT 2024
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-llvm-ir
Author: Kazu Hirata (kazutakahirata)
<details>
<summary>Changes</summary>
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.
---
Full diff: https://github.com/llvm/llvm-project/pull/98854.diff
1 Files Affected:
- (modified) llvm/include/llvm/IR/Instruction.h (+1-11)
``````````diff
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.
``````````
</details>
https://github.com/llvm/llvm-project/pull/98854
More information about the llvm-commits
mailing list