[llvm] [llvm] re-order LLVM_ABI and extern on NoKernelInfoEndLTO decl (PR #144601)
Andrew Rogers via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 17 13:47:00 PDT 2025
https://github.com/andrurogerz created https://github.com/llvm/llvm-project/pull/144601
## Overview
Fix compilation error introduced by #143615. Build failure logs available [here](https://lab.llvm.org/buildbot/#/builders/195/builds/10573)
## Background
On `extern` variable declarations, `LLVM_ABI` must appear before `extern` because `LLVM_ABI` currently resolves to `[[gnu::visibility("default")]]` when building with gcc.
>From 8afc5146446ef620a966dd03859b32689c4a1476 Mon Sep 17 00:00:00 2001
From: Andrew Rogers <andrurogerz at gmail.com>
Date: Tue, 17 Jun 2025 13:40:50 -0700
Subject: [PATCH] [llvm] re-order LLVM_ABI and extern on NoKernelInfoEndLTO
decl
---
llvm/include/llvm/Target/TargetMachine.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/llvm/include/llvm/Target/TargetMachine.h b/llvm/include/llvm/Target/TargetMachine.h
index 04c97c1502a1b..b286efdea3c19 100644
--- a/llvm/include/llvm/Target/TargetMachine.h
+++ b/llvm/include/llvm/Target/TargetMachine.h
@@ -29,7 +29,7 @@
#include <string>
#include <utility>
-extern LLVM_ABI llvm::cl::opt<bool> NoKernelInfoEndLTO;
+LLVM_ABI extern llvm::cl::opt<bool> NoKernelInfoEndLTO;
namespace llvm {
More information about the llvm-commits
mailing list