1 // RUN: %clang_cc1 -triple x86_64-unknown-linux -fsanitize=cfi-icall -fsanitize-cfi-cross-dso -emit-llvm -o - %s | FileCheck --check-prefixes=CHECK,NOCANON %s
2 // RUN: %clang_cc1 -triple x86_64-unknown-linux -fsanitize=cfi-icall -fsanitize-cfi-cross-dso -fsanitize-cfi-canonical-jump-tables -emit-llvm -o - %s | FileCheck --check-prefixes=CHECK,CANON %s
6 // CHECK: define{{.*}} void @f({{.*}} [[ATTR1:#[0-9]+]]
11 // NOCANON: declare !type {{.*}} @ext()
12 // CANON: declare void @ext()
14 // CHECK: define{{.*}} void @g({{.*}} [[ATTR2:#[0-9]+]]
15 __attribute__((cfi_canonical_jump_table
)) void g(void) {}
17 // CHECK: [[ATTR1]] = {
18 // CHECK-NOT: "cfi-canonical-jump-table"
21 // CHECK: [[ATTR2]] = { {{.*}} "cfi-canonical-jump-table" {{.*}} }
23 // NOCANON: !{i32 4, !"CFI Canonical Jump Tables", i32 0}
24 // CANON: !{i32 4, !"CFI Canonical Jump Tables", i32 1}