diff options
Diffstat (limited to 'llvm/lib/Bitcode')
-rw-r--r-- | llvm/lib/Bitcode/Reader/BitcodeReader.cpp | 3 | ||||
-rw-r--r-- | llvm/lib/Bitcode/Writer/ValueEnumerator.cpp | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/llvm/lib/Bitcode/Reader/BitcodeReader.cpp b/llvm/lib/Bitcode/Reader/BitcodeReader.cpp index 9f562ba82db..c33fc568abe 100644 --- a/llvm/lib/Bitcode/Reader/BitcodeReader.cpp +++ b/llvm/lib/Bitcode/Reader/BitcodeReader.cpp @@ -3049,7 +3049,8 @@ Error BitcodeReader::parseFunctionRecord(ArrayRef<uint64_t> Record) { // pointee type. There should be no opaque pointers where the byval type is // implicit. for (auto &Arg : Func->args()) { - if (Arg.hasByValAttr() && !Arg.getParamByValType()) { + if (Arg.hasByValAttr() && + !Arg.getAttribute(Attribute::ByVal).getValueAsType()) { Arg.removeAttr(Attribute::ByVal); Arg.addAttr(Attribute::getWithByValType( Context, Arg.getType()->getPointerElementType())); diff --git a/llvm/lib/Bitcode/Writer/ValueEnumerator.cpp b/llvm/lib/Bitcode/Writer/ValueEnumerator.cpp index 143570fb20a..f59c906c7b7 100644 --- a/llvm/lib/Bitcode/Writer/ValueEnumerator.cpp +++ b/llvm/lib/Bitcode/Writer/ValueEnumerator.cpp @@ -951,7 +951,7 @@ void ValueEnumerator::incorporateFunction(const Function &F) { // Adding function arguments to the value table. for (const auto &I : F.args()) { EnumerateValue(&I); - if (I.hasAttribute(Attribute::ByVal) && I.getParamByValType()) + if (I.hasAttribute(Attribute::ByVal)) EnumerateType(I.getParamByValType()); } FirstFuncConstantID = Values.size(); |