llvm-project
12 строк · 604.0 Байт
1; Like ctor-gc.test, but main object calls a function from its constructor,
2; which shouldn't matter; `ctor` shouldn't be pulled in.
3;
4; RUN: llvm-mc -filetype=obj -triple=wasm32-unknown-unknown %p/Inputs/ctor-ctor.s -o %t.ctor.o
5; RUN: llvm-mc -filetype=obj -triple=wasm32-unknown-unknown %p/Inputs/ctor-lib.s -o %t.lib.o
6; RUN: llvm-mc -filetype=obj -triple=wasm32-unknown-unknown %p/Inputs/ctor-setup.s -o %t.setup.o
7; RUN: rm -f %t.lib.a
8; RUN: llvm-ar rcs %t.lib.a %t.lib.o %t.ctor.o
9; RUN: wasm-ld %t.setup.o %t.lib.a -o %t.wasm
10; RUN: obj2yaml %t.wasm | FileCheck %s
11
12; CHECK-NOT: Name: test_ctor
13