brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.4 KiB · 40b4211 Raw
40 lines · plain
1; Generate summary sections and test gold handling.2; RUN: opt -module-summary %s -o %t.o3; RUN: opt -module-summary %p/Inputs/thinlto.ll -o %t2.o4; Include a file with an empty module summary index, to ensure that the expected5; output files are created regardless, for a distributed build system.6; RUN: opt -module-summary %p/Inputs/thinlto_empty.ll -o %t3.o7 8; Ensure gold generates imports files if requested for distributed backends.9; RUN: rm -f %t3.o.imports %t3.o.thinlto.bc10; RUN: %gold -plugin %llvmshlibdir/LLVMgold%shlibext \11; RUN:    --plugin-opt=thinlto \12; RUN:    --plugin-opt=thinlto-index-only \13; RUN:    --plugin-opt=thinlto-emit-imports-files \14; RUN:    -shared %t.o %t2.o %t3.o -o %t415 16; The imports file for this module contains the bitcode file for17; Inputs/thinlto.ll18; RUN: cat %t.o.imports | count 119; RUN: cat %t.o.imports | FileCheck %s --check-prefix=IMPORTS120; IMPORTS1: test/tools/gold/X86/Output/thinlto_emit_imports.ll.tmp2.o21 22; The imports file for Input/thinlto.ll is empty as it does not import anything.23; RUN: cat %t2.o.imports | count 024 25; The imports file for Input/thinlto_empty.ll is empty but should exist.26; RUN: cat %t3.o.imports | count 027 28; The index file should be created even for the input with an empty summary.29; RUN: ls %t3.o.thinlto.bc30 31target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"32 33declare void @g(...)34 35define void @f() {36entry:37  call void (...) @g()38  ret void39}40