Mehdi Amini | 822155b | 2016-04-24 05:31:43 +0000 | [diff] [blame] | 1 | ; Check the linkage types in both the per-module and combined summaries. |
| 2 | ; RUN: opt -module-summary %s -o %t.o |
| 3 | ; RUN: llvm-bcanalyzer -dump %t.o | FileCheck %s |
| 4 | ; RUN: llvm-lto -thinlto -o %t2 %t.o |
| 5 | ; RUN: llvm-bcanalyzer -dump %t2.thinlto.bc | FileCheck %s --check-prefix=COMBINED |
| 6 | |
Rafael Espindola | 1e1801c | 2018-01-11 22:15:05 +0000 | [diff] [blame] | 7 | ; Flags should be 0x57 (87) for local linkage (0x3), dso_local (0x40) and not being importable |
Teresa Johnson | e4e6279 | 2017-01-05 14:32:16 +0000 | [diff] [blame] | 8 | ; (0x10) due to local linkage plus having a section. |
Rafael Espindola | 1e1801c | 2018-01-11 22:15:05 +0000 | [diff] [blame] | 9 | ; CHECK: <PERMODULE {{.*}} op1=87 |
| 10 | ; COMBINED-DAG: <COMBINED {{.*}} op2=87 |
Teresa Johnson | e4e6279 | 2017-01-05 14:32:16 +0000 | [diff] [blame] | 11 | define internal void @functionWithSection() section "some_section" { |
Mehdi Amini | 822155b | 2016-04-24 05:31:43 +0000 | [diff] [blame] | 12 | ret void |
| 13 | } |