diff options
| author | bors <bors@rust-lang.org> | 2022-01-06 22:56:13 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2022-01-06 22:56:13 +0000 |
| commit | e012a191d768adeda1ee36a99ef8b92d51920154 (patch) | |
| tree | 7b19030fd7fd2b126d41af9aaf4b918772b95db6 /compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp | |
| parent | cfa4ac66c194046f631ce076c75516ecfdeb77ee (diff) | |
| parent | fcae1d64d98a7cbbb1f82dfdef3af52ab23e9353 (diff) | |
| download | rust-e012a191d768adeda1ee36a99ef8b92d51920154.tar.gz rust-e012a191d768adeda1ee36a99ef8b92d51920154.zip | |
Auto merge of #92627 - matthiaskrgr:rollup-xmz0rib, r=matthiaskrgr
Rollup of 8 pull requests Successful merges: - #91055 (return the correct type for closures in `type_of`) - #92207 (Delay remaining `span_bug`s in drop elaboration) - #92417 (Fix spacing and ordering of words in pretty printed Impl) - #92504 (Exit nonzero on rustc -Wall) - #92559 (RustWrapper: adapt to new AttributeMask API) - #92589 (Break the loop) - #92607 (rustc_metadata: Some minor cleanups and optimizations) - #92620 (Remove unused `ExtendDefault` struct) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp')
| -rw-r--r-- | compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp b/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp index 2a0f4fdc774..c21e4acbefe 100644 --- a/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp +++ b/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp @@ -341,14 +341,12 @@ extern "C" void LLVMRustRemoveFunctionAttributes(LLVMValueRef Fn, unsigned Index, LLVMRustAttribute RustAttr) { Function *F = unwrap<Function>(Fn); - Attribute Attr = Attribute::get(F->getContext(), fromRust(RustAttr)); - AttrBuilder B(Attr); - auto PAL = F->getAttributes(); + AttributeList PAL = F->getAttributes(); AttributeList PALNew; #if LLVM_VERSION_LT(14, 0) - PALNew = PAL.removeAttributes(F->getContext(), Index, B); + PALNew = PAL.removeAttribute(F->getContext(), Index, fromRust(RustAttr)); #else - PALNew = PAL.removeAttributesAtIndex(F->getContext(), Index, B); + PALNew = PAL.removeAttributeAtIndex(F->getContext(), Index, fromRust(RustAttr)); #endif F->setAttributes(PALNew); } |
