brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.4 KiB · 4a18831 Raw
24 lines · c
1// ; Check that the -flto=thin option emits a ThinLTO summary2// RUN: %clang_cc1 -flto=thin -emit-llvm-bc < %s | llvm-bcanalyzer -dump | FileCheck %s3// CHECK: <GLOBALVAL_SUMMARY_BLOCK4//5// ; Check that we do not emit a summary for regular LTO on Apple platforms6// RUN: %clang_cc1 -flto -triple x86_64-apple-darwin -emit-llvm-bc < %s | llvm-bcanalyzer -dump | FileCheck --check-prefix=LTO %s7// LTO-NOT: GLOBALVAL_SUMMARY_BLOCK8//9// ; Check that we emit a summary for regular LTO by default elsewhere10// RUN: %clang_cc1 -flto -triple x86_64-pc-linux-gnu -emit-llvm-bc < %s | llvm-bcanalyzer -dump | FileCheck --check-prefix=LTOINDEX %s11// LTOINDEX: <FULL_LTO_GLOBALVAL_SUMMARY_BLOCK12//13// ; Simulate -save-temps and check that it works (!"ThinLTO" module flag not added multiple times)14// RUN: %clang_cc1 -flto -triple x86_64-pc-linux-gnu -emit-llvm-bc -disable-llvm-passes < %s -o %t.bc15// RUN: %clang_cc1 -flto -triple x86_64-pc-linux-gnu -emit-llvm-bc -x ir < %t.bc | llvm-bcanalyzer -dump | FileCheck --check-prefix=LTOINDEX %s16 17/// Check that emitting bitcode works for Unified LTO, when either LTO mode is specified18// RUN: %clang_cc1 -flto=thin -funified-lto -emit-llvm-bc < %s | llvm-bcanalyzer -dump | FileCheck --check-prefix=UNITHIN %s19// RUN: %clang_cc1 -flto -funified-lto -emit-llvm-bc < %s | llvm-bcanalyzer -dump | FileCheck --check-prefix=UNITHIN %s20 21// UNITHIN: <GLOBALVAL_SUMMARY_BLOCK22 23int main(void) {}24