[PATCH] D105138: [OpaquePtr][BitcodeWriter] Handle attributes with types
Nikita Popov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 29 11:51:48 PDT 2021
nikic added inline comments.
================
Comment at: llvm/lib/Bitcode/Reader/BitcodeReader.cpp:3337
+ if (Func->getParamByValType(i) || Func->getParamInAllocaType(i) ||
+ Func->getParamStructRetType(i))
+ continue;
----------------
Shouldn't this only check for a type for the given kind, rather than all attribute kinds? I guess it doesn't matter if all of these are mutually incompatible.
================
Comment at: llvm/lib/Bitcode/Writer/ValueEnumerator.cpp:1049
}
+ for (Attribute Attr : AS) {
+ if (Attr.isTypeAttribute())
----------------
Shouldn't this be inside the `Entry == 0` condition, as it's something we only need to do once, not each time the AttributeSet is seen?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D105138/new/
https://reviews.llvm.org/D105138
More information about the llvm-commits
mailing list