================
@@ -0,0 +1,141 @@
+; Test cross-module ThinLTO sliding when Sub's compile-time instanceStart
+; is stale due to Super's hidden extension ivar.
+;
+; Hierarchy:
+;   NSObject
+;     `- Super
+;          int x;                        // x at offset 8
+;          int hidden;                   // hidden at offset 12 (extension)
+;          `- Sub
+;               int y;                   // y compiled at 12, slid to 16
+;
+; RUN: rm -rf %t && split-file %s %t
+; RUN: opt -module-summary %t/sub.ll -o %t/sub.bc
+; RUN: opt -module-summary %t/super.ll -o %t/super.bc
+; RUN: llvm-lto2 run %t/sub.bc %t/super.bc -save-temps -o %t/out \
+; RUN:   -r=%t/sub.bc,_OBJC_CLASS_$_Sub,plx \
----------------
KotoriAster wrote:

The `llvm-lto2` command is verbose, but the long symbol-resolution list is 
intentionally limited to the metadata the test needs to materialize the ObjC 
class hierarchy across the two ThinLTO modules.

https://github.com/llvm/llvm-project/pull/205970
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to