[llvm] Print more descriptive error message when trying to link a global with appending linkage (PR #69613)
Gleb Popov via llvm-commits
llvm-commits at lists.llvm.org
Sat Feb 10 03:37:51 PST 2024
https://github.com/arrowd updated https://github.com/llvm/llvm-project/pull/69613
>From 454648963ccb26ddad0bd9ef41756ab430a315f0 Mon Sep 17 00:00:00 2001
From: Gleb Popov <arrowd at freebsd.org>
Date: Thu, 19 Oct 2023 18:15:04 +0300
Subject: [PATCH] Print more descriptive error message when trying to link a
global with appending linkage
---
llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp | 2 +-
llvm/test/CodeGen/X86/AppendingLinkage.ll | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp b/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
index e89a1c26c23e6b..554e99333a5b1d 100644
--- a/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
@@ -2929,7 +2929,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