CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
40 lines
1.3 KiB
LLVM
40 lines
1.3 KiB
LLVM
; Check that files passed with the -lazy option aren't linked unless they're
|
|
; needed. The foo-ret-42.ll file, which contains only code, should not be
|
|
; needed in this -noexec case, whereas x.o, which contains a global variable
|
|
; referenced by main, should be linked (despite being passed with -lazy).
|
|
;
|
|
; RUN: rm -rf %t && mkdir -p %t
|
|
; RUN: %clang -c -o %t/foo.o %S/Inputs/foo-ret-42.ll
|
|
; RUN: %clang -c -o %t/x.o %S/Inputs/var-x-42.ll
|
|
; RUN: %clang -c -o %t/bar.o %S/Inputs/bar-ret-void-weak.ll
|
|
; RUN: %clang -c -o %t/baz.o %S/Inputs/baz-ret-void-hidden.ll
|
|
; RUN: %clang -c -o %t/main.o %s
|
|
; RUN: %llvm_jitlink -num-threads=0 -noexec -show-linked-files %t/main.o \
|
|
; RUN: -lazy %t/foo.o -lazy %t/x.o -lazy %t/bar.o -lazy %t/baz.o \
|
|
; RUN: | FileCheck %s
|
|
;
|
|
; UNSUPPORTED: system-windows
|
|
; REQUIRES: target={{(arm|aarch|x86_)64.*}}
|
|
;
|
|
; CHECK: Linking {{.*}}main.o
|
|
; CHECK-DAG: Linking <indirect stubs graph #1>
|
|
; CHECK-DAG: Linking {{.*}}x.o
|
|
; CHECK-NOT: Linking {{.*}}foo.o
|
|
|
|
declare i32 @foo()
|
|
@x = external global i32
|
|
|
|
declare void @bar()
|
|
declare hidden void @baz()
|
|
|
|
|
|
define i32 @main(i32 %argc, ptr %argv) {
|
|
entry:
|
|
%foo_result = call i32 @foo()
|
|
call void @bar()
|
|
call void @baz()
|
|
%x_val = load i32, ptr @x
|
|
%result = add nsw i32 %foo_result, %x_val
|
|
ret i32 %result
|
|
}
|