[llvm] [orc-rt] Add inline specifier to orc_rt::make_error. (PR #154922)

Lang Hames via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 22 03:33:25 PDT 2025


https://github.com/lhames created https://github.com/llvm/llvm-project/pull/154922

Prevents linker errors for duplicate definitions when make_error is used from more than one file.

>From aae1d83e82daf4846933f720542bfa2e4ba37eb7 Mon Sep 17 00:00:00 2001
From: Lang Hames <lhames at gmail.com>
Date: Fri, 22 Aug 2025 20:29:21 +1000
Subject: [PATCH] [orc-rt] Add inline specifier to orc_rt::make_error.

Prevents linker errors for duplicate definitions when make_error is used from
more than one file.
---
 orc-rt/include/orc-rt/Error.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/orc-rt/include/orc-rt/Error.h b/orc-rt/include/orc-rt/Error.h
index a25c7831644ee..fe0754bd1103f 100644
--- a/orc-rt/include/orc-rt/Error.h
+++ b/orc-rt/include/orc-rt/Error.h
@@ -126,7 +126,7 @@ class ORC_RT_NODISCARD Error {
 };
 
 /// Create an Error from an ErrorInfoBase.
-Error make_error(std::unique_ptr<ErrorInfoBase> Payload) {
+inline Error make_error(std::unique_ptr<ErrorInfoBase> Payload) {
   return Error(std::move(Payload));
 }
 



More information about the llvm-commits mailing list