| # This reproduces issue 26 from our github repo |
| # BOLT fails with the following assertion: |
| # llvm/tools/llvm-bolt/src/BinaryFunction.cpp:2950: void llvm::bolt::BinaryFunction::postProcessBranches(): Assertion `validateCFG() && "invalid CFG"' failed. |
| # RUN: llvm-mc -filetype=obj -triple x86_64-unknown-unknown \ |
| # RUN: %clang %cflags %t.o -o %t.exe -Wl,-q |
| # RUN: llvm-bolt %t.exe --relocs --print-cfg -o %t.out \ |
| # CHECK-NOT: BOLT-WARNING: CFG invalid in XYZ @ .LBB0 |
| # CHECK: Binary Function "XYZ" |
| # CHECK: .Ltmp{{.*}} (1 instructions, align : 1) |
| # CHECK-NEXT: Secondary Entry Point: FUNCat{{.*}} |
| .size main, .Lend2 - main |
| # For relocations against .text |