brintos

brintos / llvm-project-archived public Read only

0
0
Text · 937 B · 61016b4 Raw
32 lines · plain
1; Ensure calling bypassing the driver with -fembed-bitcode embeds bitcode pre-2; optimizations3; REQUIRES: x86-registered-target4 5; RUN: %clang_cc1 -O2 -triple x86_64-unknown-linux-gnu -emit-obj %s -o %t.o -fembed-bitcode=all6; RUN: llvm-objcopy --dump-section=.llvmbc=%t.bc %t.o /dev/null7 8; Also check that the .llvmcmd section captures the optimization options.9; RUN: llvm-dis %t.bc -o - | FileCheck %s --check-prefix=CHECK-BC10; RUN: llvm-objcopy --dump-section=.llvmcmd=- %t.o /dev/null | FileCheck %s --check-prefix=CHECK-CMD11 12; CHECK-BC-LABEL: define void @bar() #0 {13; CHECK-BC-NEXT:  ret void  14; CHECK-BC-NEXT: }15; CHECK-BC-LABEL: define void @foo() {16; CHECK-BC-NEXT: call void @bar()17; CHECK-BC-NEXT: ret void18; CHECK-BC-NEXT: }19; CHECK-BC-LABEL: attributes #0 = { alwaysinline }20; CHECK-CMD: -O221 22define void @bar() #0 {23    ret void24}25 26define void @foo() {27  call void @bar()28  ret void29}30 31attributes #0 = { alwaysinline }32