[llvm] Print more descriptive error message when trying to link a global with appending linkage (PR #69613)
via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 19 09:19:52 PDT 2023
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-backend-x86
Author: Gleb Popov (arrowd)
<details>
<summary>Changes</summary>
This is a proper fix for https://github.com/llvm/llvm-project/issues/40308
---
Full diff: https://github.com/llvm/llvm-project/pull/69613.diff
2 Files Affected:
- (modified) llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp (+1-1)
- (modified) llvm/test/CodeGen/X86/AppendingLinkage.ll (+1-1)
``````````diff
diff --git a/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp b/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
index 072c55f79caa9dc..dab02272fadf9b9 100644
--- a/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
@@ -2746,7 +2746,7 @@ bool AsmPrinter::emitSpecialLLVMGlobal(const GlobalVariable *GV) {
return true;
}
- report_fatal_error("unknown special variable");
+ report_fatal_error("unknown special variable with appending linkage");
}
/// EmitLLVMUsedList - For targets that define a MAI::UsedDirective, mark each
diff --git a/llvm/test/CodeGen/X86/AppendingLinkage.ll b/llvm/test/CodeGen/X86/AppendingLinkage.ll
index 83bfbe85240afb1..ace5d192b7ea7ee 100644
--- a/llvm/test/CodeGen/X86/AppendingLinkage.ll
+++ b/llvm/test/CodeGen/X86/AppendingLinkage.ll
@@ -1,4 +1,4 @@
; RUN: not --crash llc < %s -mtriple=i686-- 2>&1 | FileCheck %s
-; CHECK: unknown special variable
+; CHECK: unknown special variable with appending linkage
@foo = appending constant [1 x i32 ]zeroinitializer
``````````
</details>
https://github.com/llvm/llvm-project/pull/69613
More information about the llvm-commits
mailing list