From 7de1d77026242c9bcbda4e47eb91806c671ee4ba Mon Sep 17 00:00:00 2001 From: Aiden Grossman Date: Wed, 10 Dec 2025 21:41:55 +0000 Subject: [PATCH 1/3] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20in?= =?UTF-8?q?itial=20version?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Created using spr 1.3.7 --- llvm/docs/LangRef.rst | 6 ++-- llvm/include/llvm/IR/Argument.h | 2 +- llvm/include/llvm/IR/Attributes.h | 12 +++++++ llvm/include/llvm/IR/Attributes.td | 2 +- llvm/include/llvm/IR/Function.h | 6 ++++ llvm/lib/AsmParser/LLParser.cpp | 10 +++++- llvm/lib/Bitcode/Reader/BitcodeReader.cpp | 5 +++ llvm/lib/IR/AttributeImpl.h | 1 + llvm/lib/IR/Attributes.cpp | 31 ++++++++++++++++++ llvm/lib/IR/Function.cpp | 7 ++-- .../Scalar/DeadStoreElimination.cpp | 3 +- llvm/test/Bitcode/attributes.ll | 4 +-- llvm/test/Bitcode/dead-on-return-upgrade.ll | 7 ++++ .../test/Bitcode/dead-on-return-upgrade.ll.bc | Bin 0 -> 1612 bytes .../Transforms/DeadStoreElimination/simple.ll | 6 ++-- llvm/test/Verifier/dead-on-return.ll | 4 +-- 16 files changed, 89 insertions(+), 17 deletions(-) create mode 100644 llvm/test/Bitcode/dead-on-return-upgrade.ll create mode 100644 llvm/test/Bitcode/dead-on-return-upgrade.ll.bc diff --git a/llvm/docs/LangRef.rst b/llvm/docs/LangRef.rst index 5fa3a4ebb2472..069c8e3f79657 100644 --- a/llvm/docs/LangRef.rst +++ b/llvm/docs/LangRef.rst @@ -1842,11 +1842,13 @@ Currently, only the following parameter attributes are defined: This attribute cannot be applied to return values. -``dead_on_return`` +``dead_on_return()`` This attribute indicates that the memory pointed to by the argument is dead upon function return, both upon normal return and if the calls unwinds, meaning that the caller will not depend on its contents. Stores that would be observable - either on the return path or on the unwind path may be elided. + either on the return path or on the unwind path may be elided. The number of + bytes known to be dead must be provided in parentheses. It is legal for the + number of bytes to be less than the size of the pointee type. Specifically, the behavior is as-if any memory written through the pointer during the execution of the function is overwritten with a poison value diff --git a/llvm/include/llvm/IR/Argument.h b/llvm/include/llvm/IR/Argument.h index 6ffc0f8fd5155..df380919629fe 100644 --- a/llvm/include/llvm/IR/Argument.h +++ b/llvm/include/llvm/IR/Argument.h @@ -79,7 +79,7 @@ class Argument final : public Value { LLVM_ABI bool hasByValAttr() const; /// Return true if this argument has the dead_on_return attribute. - LLVM_ABI bool hasDeadOnReturnAttr() const; + LLVM_ABI uint64_t getDeadOnReturnBytes() const; /// Return true if this argument has the byref attribute. LLVM_ABI bool hasByRefAttr() const; diff --git a/llvm/include/llvm/IR/Attributes.h b/llvm/include/llvm/IR/Attributes.h index e734466ce20e0..241c5060ec6cf 100644 --- a/llvm/include/llvm/IR/Attributes.h +++ b/llvm/include/llvm/IR/Attributes.h @@ -276,6 +276,10 @@ class Attribute { /// dereferenceable attribute. LLVM_ABI uint64_t getDereferenceableBytes() const; + /// Returns the number of dead_on_return bytes from the + /// dead_on_return attribute. + LLVM_ABI uint64_t getDeadOnReturnBytes() const; + /// Returns the number of dereferenceable_or_null bytes from the /// dereferenceable_or_null attribute. LLVM_ABI uint64_t getDereferenceableOrNullBytes() const; @@ -445,6 +449,7 @@ class AttributeSet { LLVM_ABI MaybeAlign getAlignment() const; LLVM_ABI MaybeAlign getStackAlignment() const; LLVM_ABI uint64_t getDereferenceableBytes() const; + LLVM_ABI uint64_t getDeadOnReturnBytes() const; LLVM_ABI uint64_t getDereferenceableOrNullBytes() const; LLVM_ABI Type *getByValType() const; LLVM_ABI Type *getStructRetType() const; @@ -964,6 +969,9 @@ class AttributeList { /// the return value. LLVM_ABI uint64_t getRetDereferenceableOrNullBytes() const; + /// Get the number of dead_on_return bytes (or zero if unknown) of an arg. + LLVM_ABI uint64_t getDeadOnReturnBytes(unsigned Index) const; + /// Get the number of dereferenceable_or_null bytes (or zero if unknown) of an /// arg. LLVM_ABI uint64_t getParamDereferenceableOrNullBytes(unsigned ArgNo) const; @@ -1242,6 +1250,10 @@ class AttrBuilder { /// internally in Attribute. LLVM_ABI AttrBuilder &addDereferenceableAttr(uint64_t Bytes); + /// This turns the number of dead_on_return bytes into the form used + /// internally in Attribute. + LLVM_ABI AttrBuilder &addDeadOnReturnAttr(uint64_t Bytes); + /// This turns the number of dereferenceable_or_null bytes into the /// form used internally in Attribute. LLVM_ABI AttrBuilder &addDereferenceableOrNullAttr(uint64_t Bytes); diff --git a/llvm/include/llvm/IR/Attributes.td b/llvm/include/llvm/IR/Attributes.td index c086a39616249..e4db0e6984780 100644 --- a/llvm/include/llvm/IR/Attributes.td +++ b/llvm/include/llvm/IR/Attributes.td @@ -204,7 +204,7 @@ def NoFree : EnumAttr<"nofree", IntersectAnd, [FnAttr, ParamAttr]>; def DeadOnUnwind : EnumAttr<"dead_on_unwind", IntersectAnd, [ParamAttr]>; /// Argument is dead upon function return. -def DeadOnReturn : EnumAttr<"dead_on_return", IntersectAnd, [ParamAttr]>; +def DeadOnReturn : IntAttr<"dead_on_return", IntersectMin, [ParamAttr]>; /// Disable implicit floating point insts. def NoImplicitFloat : EnumAttr<"noimplicitfloat", IntersectPreserve, [FnAttr]>; diff --git a/llvm/include/llvm/IR/Function.h b/llvm/include/llvm/IR/Function.h index d3497716ca844..48b1604bdea32 100644 --- a/llvm/include/llvm/IR/Function.h +++ b/llvm/include/llvm/IR/Function.h @@ -523,6 +523,12 @@ class LLVM_ABI Function : public GlobalObject, public ilist_node { return AttributeSets.getParamDereferenceableBytes(ArgNo); } + /// Extract the number of dead_on_return bytes for a parameter. + /// @param ArgNo Index of an argument, with 0 being the first function arg. + uint64_t getDeadOnReturnBytes(unsigned ArgNo) const { + return AttributeSets.getDeadOnReturnBytes(ArgNo); + } + /// Extract the number of dereferenceable_or_null bytes for a /// parameter. /// @param ArgNo AttributeList ArgNo, referring to an argument. diff --git a/llvm/lib/AsmParser/LLParser.cpp b/llvm/lib/AsmParser/LLParser.cpp index a09ab4fc7828c..3600072601adc 100644 --- a/llvm/lib/AsmParser/LLParser.cpp +++ b/llvm/lib/AsmParser/LLParser.cpp @@ -1612,6 +1612,13 @@ bool LLParser::parseEnumAttribute(Attribute::AttrKind Attr, AttrBuilder &B, B.addDereferenceableAttr(Bytes); return false; } + case Attribute::DeadOnReturn: { + uint64_t Bytes; + if (parseOptionalDerefAttrBytes(lltok::kw_dead_on_return, Bytes)) + return true; + B.addDeadOnReturnAttr(Bytes); + return false; + } case Attribute::DereferenceableOrNull: { uint64_t Bytes; if (parseOptionalDerefAttrBytes(lltok::kw_dereferenceable_or_null, Bytes)) @@ -2476,7 +2483,8 @@ bool LLParser::parseOptionalCodeModel(CodeModel::Model &model) { bool LLParser::parseOptionalDerefAttrBytes(lltok::Kind AttrKind, uint64_t &Bytes) { assert((AttrKind == lltok::kw_dereferenceable || - AttrKind == lltok::kw_dereferenceable_or_null) && + AttrKind == lltok::kw_dereferenceable_or_null || + AttrKind == lltok::kw_dead_on_return) && "contract!"); Bytes = 0; diff --git a/llvm/lib/Bitcode/Reader/BitcodeReader.cpp b/llvm/lib/Bitcode/Reader/BitcodeReader.cpp index 9dd993f0dc173..fcaa7865247d1 100644 --- a/llvm/lib/Bitcode/Reader/BitcodeReader.cpp +++ b/llvm/lib/Bitcode/Reader/BitcodeReader.cpp @@ -80,6 +80,7 @@ #include #include #include +#include #include #include #include @@ -2384,6 +2385,8 @@ Error BitcodeReader::parseAttributeGroupBlock() { B.addInAllocaAttr(nullptr); else if (Kind == Attribute::UWTable) B.addUWTableAttr(UWTableKind::Default); + else if (Kind == Attribute::DeadOnReturn) + B.addDeadOnReturnAttr(std::numeric_limits::max()); else if (Attribute::isEnumAttrKind(Kind)) B.addAttribute(Kind); else @@ -2402,6 +2405,8 @@ Error BitcodeReader::parseAttributeGroupBlock() { B.addDereferenceableAttr(Record[++i]); else if (Kind == Attribute::DereferenceableOrNull) B.addDereferenceableOrNullAttr(Record[++i]); + else if (Kind == Attribute::DeadOnReturn) + B.addDeadOnReturnAttr(Record[++i]); else if (Kind == Attribute::AllocSize) B.addAllocSizeAttrFromRawRepr(Record[++i]); else if (Kind == Attribute::VScaleRange) diff --git a/llvm/lib/IR/AttributeImpl.h b/llvm/lib/IR/AttributeImpl.h index 707c8205ee1f9..da216458d0b19 100644 --- a/llvm/lib/IR/AttributeImpl.h +++ b/llvm/lib/IR/AttributeImpl.h @@ -332,6 +332,7 @@ class AttributeSetNode final MaybeAlign getAlignment() const; MaybeAlign getStackAlignment() const; uint64_t getDereferenceableBytes() const; + uint64_t getDeadOnReturnBytes() const; uint64_t getDereferenceableOrNullBytes() const; std::optional>> getAllocSizeArgs() const; diff --git a/llvm/lib/IR/Attributes.cpp b/llvm/lib/IR/Attributes.cpp index fe6d3e5edeb09..87d30672de956 100644 --- a/llvm/lib/IR/Attributes.cpp +++ b/llvm/lib/IR/Attributes.cpp @@ -451,6 +451,13 @@ uint64_t Attribute::getDereferenceableBytes() const { return pImpl->getValueAsInt(); } +uint64_t Attribute::getDeadOnReturnBytes() const { + assert(hasAttribute(Attribute::DeadOnReturn) && + "Trying to get dead_on_return bytes from" + "from a parameter without such an attribute!"); + return pImpl->getValueAsInt(); +} + uint64_t Attribute::getDereferenceableOrNullBytes() const { assert(hasAttribute(Attribute::DereferenceableOrNull) && "Trying to get dereferenceable bytes from " @@ -574,6 +581,9 @@ std::string Attribute::getAsString(bool InAttrGrp) const { if (hasAttribute(Attribute::DereferenceableOrNull)) return AttrWithBytesToString("dereferenceable_or_null"); + if (hasAttribute(Attribute::DeadOnReturn)) + return AttrWithBytesToString("dead_on_return"); + if (hasAttribute(Attribute::AllocSize)) { unsigned ElemSize; std::optional NumElems; @@ -1162,6 +1172,10 @@ uint64_t AttributeSet::getDereferenceableBytes() const { return SetNode ? SetNode->getDereferenceableBytes() : 0; } +uint64_t AttributeSet::getDeadOnReturnBytes() const { + return SetNode ? SetNode->getDeadOnReturnBytes() : 0; +} + uint64_t AttributeSet::getDereferenceableOrNullBytes() const { return SetNode ? SetNode->getDereferenceableOrNullBytes() : 0; } @@ -1366,6 +1380,12 @@ uint64_t AttributeSetNode::getDereferenceableBytes() const { return 0; } +uint64_t AttributeSetNode::getDeadOnReturnBytes() const { + if (auto A = findEnumAttribute(Attribute::DeadOnReturn)) + return A->getDeadOnReturnBytes(); + return 0; +} + uint64_t AttributeSetNode::getDereferenceableOrNullBytes() const { if (auto A = findEnumAttribute(Attribute::DereferenceableOrNull)) return A->getDereferenceableOrNullBytes(); @@ -1983,6 +2003,10 @@ uint64_t AttributeList::getRetDereferenceableOrNullBytes() const { return getRetAttrs().getDereferenceableOrNullBytes(); } +uint64_t AttributeList::getDeadOnReturnBytes(unsigned Index) const { + return getParamAttrs(Index).getDeadOnReturnBytes(); +} + uint64_t AttributeList::getParamDereferenceableOrNullBytes(unsigned Index) const { return getParamAttrs(Index).getDereferenceableOrNullBytes(); @@ -2205,6 +2229,13 @@ AttrBuilder &AttrBuilder::addDereferenceableAttr(uint64_t Bytes) { return addRawIntAttr(Attribute::Dereferenceable, Bytes); } +AttrBuilder &AttrBuilder::addDeadOnReturnAttr(uint64_t Bytes) { + if (Bytes == 0) + return *this; + + return addRawIntAttr(Attribute::DeadOnReturn, Bytes); +} + AttrBuilder &AttrBuilder::addDereferenceableOrNullAttr(uint64_t Bytes) { if (Bytes == 0) return *this; diff --git a/llvm/lib/IR/Function.cpp b/llvm/lib/IR/Function.cpp index 31a294447152e..d4e80762919c8 100644 --- a/llvm/lib/IR/Function.cpp +++ b/llvm/lib/IR/Function.cpp @@ -130,10 +130,9 @@ bool Argument::hasByValAttr() const { return hasAttribute(Attribute::ByVal); } -bool Argument::hasDeadOnReturnAttr() const { - if (!getType()->isPointerTy()) - return false; - return hasAttribute(Attribute::DeadOnReturn); +uint64_t Argument::getDeadOnReturnBytes() const { + assert(getType()->isPointerTy() && "Only pointers have dead_on_return bytes"); + return getParent()->getDeadOnReturnBytes(getArgNo()); } bool Argument::hasByRefAttr() const { diff --git a/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp b/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp index 4ac1321860f66..16ab2d5f63dd5 100644 --- a/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp +++ b/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp @@ -1017,7 +1017,8 @@ struct DSEState { // Treat byval, inalloca or dead on return arguments the same as Allocas, // stores to them are dead at the end of the function. for (Argument &AI : F.args()) - if (AI.hasPassPointeeByValueCopyAttr() || AI.hasDeadOnReturnAttr()) + if (AI.hasPassPointeeByValueCopyAttr() || + (AI.getType()->isPointerTy() && AI.getDeadOnReturnBytes() > 0)) InvisibleToCallerAfterRet.insert({&AI, true}); // Collect whether there is any irreducible control flow in the function. diff --git a/llvm/test/Bitcode/attributes.ll b/llvm/test/Bitcode/attributes.ll index 107a98aebeeb8..e908d95215c7d 100644 --- a/llvm/test/Bitcode/attributes.ll +++ b/llvm/test/Bitcode/attributes.ll @@ -577,8 +577,8 @@ define void @captures(ptr captures(address) %p) { ret void } -; CHECK: define void @dead_on_return(ptr dead_on_return %p) -define void @dead_on_return(ptr dead_on_return %p) { +; CHECK: define void @dead_on_return(ptr dead_on_return(4) %p) +define void @dead_on_return(ptr dead_on_return(4) %p) { ret void } diff --git a/llvm/test/Bitcode/dead-on-return-upgrade.ll b/llvm/test/Bitcode/dead-on-return-upgrade.ll new file mode 100644 index 0000000000000..d3fa2b8f91108 --- /dev/null +++ b/llvm/test/Bitcode/dead-on-return-upgrade.ll @@ -0,0 +1,7 @@ +; RUN: llvm-dis -o - %s.bc | FileCheck %s + +; CHECK: define void @test_dead_on_return_autoupgrade(ptr dead_on_return(18446744073709551615) %p) { + +define void @test_dead_on_return_autoupgrade(ptr dead_on_return %p) { + ret void +} diff --git a/llvm/test/Bitcode/dead-on-return-upgrade.ll.bc b/llvm/test/Bitcode/dead-on-return-upgrade.ll.bc new file mode 100644 index 0000000000000000000000000000000000000000..a2432d5a39b5b0a28b2e4872340e1e704fde370a GIT binary patch literal 1612 zcmXX`Z%h+s7=Oz_uR?vVGE@q8-Bpu^B`$-^EbbdFd|(SMw8vP79YeD$Bofk&g0P?vWsAxDu;*Zx^m+TTJH<$h$d#5~Ac|u_^r#ymJ74WU%7% zhE)D(rN(H!r5IAbQJ~W5@^7{U)Nke4ZWY;F8e@q`ReGk-Xbjs&U3%eqIR6xFv{iPc zRC_AltiK-7oKYBEL#kUeTOov(kydNV*B&w)iZ-5OE55J4uGUKAgS}c~BvMIgjctd` zspy`HRB;$Hb*>YqQknz8$vkZty1^o}ORmY2ulde)?H5fGglJdNVK3ZuP?#>T84s#d zWeS6h)1byuv|WFBm_@VD&uQ4hf?m6ZP?`QL{$l_A-Jd*s(EY>BUv*82uMnz-hdbA% zqPRT&vm_ui)rKC!y((3Jp32gm5`{G^n1-Z?EkF+Rlil$y^$Mb%YVcM7SE+5fWP+I; zp*>u|_G_W?G+|8%)(Bxu_ecC*@`{Qau!~+VIp`&N`$aD+YSVl0dK70ls*|IZHu0td zS81l0MLj*QXOd2xhr7W~g!nnZJVsb1LY5(dPj8m=wvtym$l4Ck2QeUeqoTK!>@|?R zFAE@TUqEb8iCv|lFD?$mgNL7O;%6EB_at8Dh_=)Sog1Ok+i}53&*~9tQrJ{dW)Xu(3Jww!U z2hK(DQazPr@j7(D8kmKIF4>@aq^B2xx`hm#%QAl{be_^i)2L8)JH)3QmH#)=D)#l0 z{qe@LTTx0zK=+|;#!0X0nZ*QiRiTp$)-#(<<$IroOlgT96|4ZrtE43-@L||Wk)H~o zQ?U=~QIUfN(iab&Thie5Nxba9FSv@tqXu0ryMI2*EJ6WxEk7Evj)lsHBvV8%rzOjH z!km(zM@!m1)}=b+iI>qEUA&1 | FileCheck %s -; CHECK: Attribute 'dead_on_return' applied to incompatible type! +; CHECK: Attribute 'dead_on_return(4)' applied to incompatible type! ; CHECK-NEXT: ptr @arg_not_pointer -define void @arg_not_pointer(i32 dead_on_return %arg) { +define void @arg_not_pointer(i32 dead_on_return(4) %arg) { ret void } From 0015c3a5acec59fda736f3faed9b04a01abba8a7 Mon Sep 17 00:00:00 2001 From: Aiden Grossman Date: Wed, 10 Dec 2025 21:48:34 +0000 Subject: [PATCH 2/3] bitcode autoupgrade Created using spr 1.3.7 --- llvm/include/llvm/AsmParser/LLParser.h | 2 +- llvm/lib/AsmParser/LLParser.cpp | 13 +++++++------ llvm/test/Transforms/DeadStoreElimination/simple.ll | 2 +- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/llvm/include/llvm/AsmParser/LLParser.h b/llvm/include/llvm/AsmParser/LLParser.h index 9eb31d7e0a451..f94d7c7644427 100644 --- a/llvm/include/llvm/AsmParser/LLParser.h +++ b/llvm/include/llvm/AsmParser/LLParser.h @@ -319,7 +319,7 @@ namespace llvm { bool parseOptionalAlignment(MaybeAlign &Alignment, bool AllowParens = false); bool parseOptionalCodeModel(CodeModel::Model &model); - bool parseOptionalDerefAttrBytes(lltok::Kind AttrKind, uint64_t &Bytes); + bool parseOptionalAttrBytes(lltok::Kind AttrKind, uint64_t &Bytes); bool parseOptionalUWTableKind(UWTableKind &Kind); bool parseAllocKind(AllocFnKind &Kind); std::optional parseMemoryAttr(); diff --git a/llvm/lib/AsmParser/LLParser.cpp b/llvm/lib/AsmParser/LLParser.cpp index 3600072601adc..871d908f39e7a 100644 --- a/llvm/lib/AsmParser/LLParser.cpp +++ b/llvm/lib/AsmParser/LLParser.cpp @@ -1607,21 +1607,21 @@ bool LLParser::parseEnumAttribute(Attribute::AttrKind Attr, AttrBuilder &B, } case Attribute::Dereferenceable: { uint64_t Bytes; - if (parseOptionalDerefAttrBytes(lltok::kw_dereferenceable, Bytes)) + if (parseOptionalAttrBytes(lltok::kw_dereferenceable, Bytes)) return true; B.addDereferenceableAttr(Bytes); return false; } case Attribute::DeadOnReturn: { uint64_t Bytes; - if (parseOptionalDerefAttrBytes(lltok::kw_dead_on_return, Bytes)) + if (parseOptionalAttrBytes(lltok::kw_dead_on_return, Bytes)) return true; B.addDeadOnReturnAttr(Bytes); return false; } case Attribute::DereferenceableOrNull: { uint64_t Bytes; - if (parseOptionalDerefAttrBytes(lltok::kw_dereferenceable_or_null, Bytes)) + if (parseOptionalAttrBytes(lltok::kw_dereferenceable_or_null, Bytes)) return true; B.addDereferenceableOrNullAttr(Bytes); return false; @@ -2475,12 +2475,13 @@ bool LLParser::parseOptionalCodeModel(CodeModel::Model &model) { return false; } -/// parseOptionalDerefAttrBytes +/// parseOptionalAttrBytes /// ::= /* empty */ /// ::= AttrKind '(' 4 ')' /// -/// where AttrKind is either 'dereferenceable' or 'dereferenceable_or_null'. -bool LLParser::parseOptionalDerefAttrBytes(lltok::Kind AttrKind, +/// where AttrKind is either 'dereferenceable', 'dereferenceable_or_null', or +/// 'dead_on_return' +bool LLParser::parseOptionalAttrBytes(lltok::Kind AttrKind, uint64_t &Bytes) { assert((AttrKind == lltok::kw_dereferenceable || AttrKind == lltok::kw_dereferenceable_or_null || diff --git a/llvm/test/Transforms/DeadStoreElimination/simple.ll b/llvm/test/Transforms/DeadStoreElimination/simple.ll index 3aa28a22f445b..c9f43c6a574bc 100644 --- a/llvm/test/Transforms/DeadStoreElimination/simple.ll +++ b/llvm/test/Transforms/DeadStoreElimination/simple.ll @@ -874,7 +874,7 @@ define void @test_dead_on_return_maythrow(ptr dead_on_return(4) %p) { ret void } -define ptr @test_dead_on_return_ptr_returned(ptr dead_on_return(4) %p) { +define ptr @test_dead_on_return_ptr_returned(ptr dead_on_return(64) %p) { ; CHECK-LABEL: @test_dead_on_return_ptr_returned( ; CHECK-NEXT: [[LOCAL_VAR:%.*]] = alloca ptr, align 8 ; CHECK-NEXT: call void @opaque(ptr [[LOCAL_VAR]]) From 6e65f88a34fb8d9ff58525e77af39826b0058a40 Mon Sep 17 00:00:00 2001 From: Aiden Grossman Date: Wed, 10 Dec 2025 21:52:40 +0000 Subject: [PATCH 3/3] formatting Created using spr 1.3.7 --- llvm/lib/AsmParser/LLParser.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/llvm/lib/AsmParser/LLParser.cpp b/llvm/lib/AsmParser/LLParser.cpp index 871d908f39e7a..148e0dad8e5c3 100644 --- a/llvm/lib/AsmParser/LLParser.cpp +++ b/llvm/lib/AsmParser/LLParser.cpp @@ -2481,8 +2481,7 @@ bool LLParser::parseOptionalCodeModel(CodeModel::Model &model) { /// /// where AttrKind is either 'dereferenceable', 'dereferenceable_or_null', or /// 'dead_on_return' -bool LLParser::parseOptionalAttrBytes(lltok::Kind AttrKind, - uint64_t &Bytes) { +bool LLParser::parseOptionalAttrBytes(lltok::Kind AttrKind, uint64_t &Bytes) { assert((AttrKind == lltok::kw_dereferenceable || AttrKind == lltok::kw_dereferenceable_or_null || AttrKind == lltok::kw_dead_on_return) &&