[llvm] 0356d0c - Print more descriptive error message when trying to link a global with appending linkage (#69613)
via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 3 04:26:16 PDT 2024
Author: Gleb Popov
Date: 2024-04-03T12:26:12+01:00
New Revision: 0356d0cfdc5cc7173533c2ad6c2ea8ad342f1acc
URL: https://github.com/llvm/llvm-project/commit/0356d0cfdc5cc7173533c2ad6c2ea8ad342f1acc
DIFF: https://github.com/llvm/llvm-project/commit/0356d0cfdc5cc7173533c2ad6c2ea8ad342f1acc.diff
LOG: Print more descriptive error message when trying to link a global with appending linkage (#69613)
This is a proper fix for https://github.com/llvm/llvm-project/issues/40308
Added:
Modified:
llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
llvm/test/CodeGen/X86/AppendingLinkage.ll
Removed:
################################################################################
diff --git a/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp b/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
index a15538755d73b3..293bb5a3c6f6eb 100644
--- a/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
@@ -2927,7 +2927,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 83bfbe85240afb..ace5d192b7ea7e 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
More information about the llvm-commits
mailing list