[PATCH] D152448: [Metadata] Fix `addAnnotationMetadata` when appending a string tuple to an existing MDTuple.
Zain Jaffal via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 9 06:21:44 PDT 2023
This revision was automatically updated to reflect the committed changes.
Closed by commit rGc45695ef4657: [Metadata] Fix `addAnnotationMetadata` when appending a string tuple to an… (authored by zjaffal).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D152448/new/
https://reviews.llvm.org/D152448
Files:
llvm/lib/IR/Metadata.cpp
Index: llvm/lib/IR/Metadata.cpp
===================================================================
--- llvm/lib/IR/Metadata.cpp
+++ llvm/lib/IR/Metadata.cpp
@@ -1551,8 +1551,10 @@
if (Existing) {
auto *Tuple = cast<MDTuple>(Existing);
for (auto &N : Tuple->operands()) {
- if (isa<MDString>(N.get()))
+ if (isa<MDString>(N.get())) {
+ Names.push_back(N);
continue;
+ }
auto *MDAnnotationTuple = cast<MDTuple>(N);
if (any_of(MDAnnotationTuple->operands(), [&AnnotationsSet](auto &Op) {
return AnnotationsSet.contains(cast<MDString>(Op)->getString());
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D152448.529942.patch
Type: text/x-patch
Size: 622 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230609/3b82be15/attachment.bin>
More information about the llvm-commits
mailing list