[llvm] 908f74a - [llvm] re-order LLVM_ABI and extern on NoKernelInfoEndLTO decl (#144601)
via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 17 13:49:21 PDT 2025
Author: Andrew Rogers
Date: 2025-06-17T13:49:18-07:00
New Revision: 908f74a25e01cc88d1dee1af5521d8fb1c21bc51
URL: https://github.com/llvm/llvm-project/commit/908f74a25e01cc88d1dee1af5521d8fb1c21bc51
DIFF: https://github.com/llvm/llvm-project/commit/908f74a25e01cc88d1dee1af5521d8fb1c21bc51.diff
LOG: [llvm] re-order LLVM_ABI and extern on NoKernelInfoEndLTO decl (#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.
Added:
Modified:
llvm/include/llvm/Target/TargetMachine.h
Removed:
################################################################################
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