[llvm] [ThinLTO] Allow importing based on a workload definition (PR #74545)

Teresa Johnson via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 11 14:29:00 PST 2023


================
@@ -0,0 +1,22 @@
+target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
+target triple = "x86_64-pc-linux-gnu"
+
+declare void @m2_variant()
+
+define dso_local void @m2_f1() {
+  call void @interposable_f()
+  call void @noninterposable_f()
+  ret void
+}
+
+ at m2_f1_alias = alias void (...), ptr @m2_f1
+
+define linkonce_odr void @interposable_f() {
----------------
teresajohnson wrote:

Maybe make it have strong (external) linkage then. I'm not sure in reality that the linker would ever select a linkonce_odr as prevailing over linkonce. Typically it is an interposable (e.g. linkonce or weak) symbol being overridden by a strong symbol.

https://github.com/llvm/llvm-project/pull/74545


More information about the llvm-commits mailing list