37 lines · plain
1; REQUIRES: x862 3; RUN: split-file %s %t.dir4; RUN: llvm-as %t.dir/other.ll -o %t.other.bc5; RUN: llc -filetype=obj -o %t.main.obj %t.dir/main.ll6 7; RUN: lld-link -out:%t.exe -subsystem:console %t.other.bc %t.main.obj8 9#--- main.ll10target datalayout = "e-m:w-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"11target triple = "x86_64-unknown-windows-msvc19.14.0"12 13$comdatData = comdat samesize14 15@comdatData = weak_odr dso_local global i32 42, comdat16 17define dso_local void @mainCRTStartup() {18entry:19 tail call void @other()20 ret void21}22 23declare dso_local void @other()24 25#--- other.ll26target datalayout = "e-m:w-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"27target triple = "x86_64-unknown-windows-msvc19.14.0"28 29$comdatData = comdat samesize30 31@comdatData = weak_odr dso_local global i32 42, comdat32 33define dso_local void @other() {34entry:35 ret void36}37