diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2023-02-14 18:24:40 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-02-14 18:24:40 +0100 |
| commit | a1ba8611907f847d8bc43565566ee739dd9d5202 (patch) | |
| tree | afb21c982c168c10c8dde37373686cc82e63a469 /compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp | |
| parent | 9bb6e60d1f1360234aae90c97964c0fa5524f141 (diff) | |
| parent | ffdbd58d85ef1f172e4b78e00655b36131ed1d4f (diff) | |
| download | rust-a1ba8611907f847d8bc43565566ee739dd9d5202.tar.gz rust-a1ba8611907f847d8bc43565566ee739dd9d5202.zip | |
Rollup merge of #107573 - cuviper:drop-llvm-13, r=nagisa
Update the minimum external LLVM to 14 With this change, we'll have stable support for LLVM 14 through 16 (pending release). For reference, the previous increase to LLVM 13 was #100460.
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp')
| -rw-r--r-- | compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp b/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp index 87b0e1273eb..b1e6534944d 100644 --- a/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp +++ b/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp @@ -63,11 +63,7 @@ static LLVM_THREAD_LOCAL char *LastError; // // Notably it exits the process with code 101, unlike LLVM's default of 1. static void FatalErrorHandler(void *UserData, -#if LLVM_VERSION_LT(14, 0) - const std::string& Reason, -#else const char* Reason, -#endif bool GenCrashDiag) { // Do the same thing that the default error handler does. std::cerr << "LLVM ERROR: " << Reason << std::endl; @@ -249,18 +245,10 @@ static Attribute::AttrKind fromRust(LLVMRustAttribute Kind) { template<typename T> static inline void AddAttributes(T *t, unsigned Index, LLVMAttributeRef *Attrs, size_t AttrsLen) { AttributeList PAL = t->getAttributes(); - AttributeList PALNew; -#if LLVM_VERSION_LT(14, 0) - AttrBuilder B; - for (LLVMAttributeRef Attr : makeArrayRef(Attrs, AttrsLen)) - B.addAttribute(unwrap(Attr)); - PALNew = PAL.addAttributes(t->getContext(), Index, B); -#else AttrBuilder B(t->getContext()); for (LLVMAttributeRef Attr : ArrayRef<LLVMAttributeRef>(Attrs, AttrsLen)) B.addAttribute(unwrap(Attr)); - PALNew = PAL.addAttributesAtIndex(t->getContext(), Index, B); -#endif + AttributeList PALNew = PAL.addAttributesAtIndex(t->getContext(), Index, B); t->setAttributes(PALNew); } |
