Mercurial > hg > CbC > CbC_llvm
view clang/test/CodeGen/cfi-icall-canonical-jump-tables.c @ 207:2e18cbf3894f
LLVM12
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Tue, 08 Jun 2021 06:07:14 +0900 |
parents | 1d019706d866 |
children | c4bab56944e8 |
line wrap: on
line source
// 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 // 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 void ext(void); // CHECK: define{{.*}} void @f({{.*}} [[ATTR1:#[0-9]+]] void f() { ext(); } // NOCANON: declare !type {{.*}} @ext() // CANON: declare void @ext() // CHECK: define{{.*}} void @g({{.*}} [[ATTR2:#[0-9]+]] __attribute__((cfi_canonical_jump_table)) void g() {} // CHECK: [[ATTR1]] = { // CHECK-NOT: "cfi-canonical-jump-table" // CHECK: } // CHECK: [[ATTR2]] = { {{.*}} "cfi-canonical-jump-table" {{.*}} } // NOCANON: !{i32 4, !"CFI Canonical Jump Tables", i32 0} // CANON: !{i32 4, !"CFI Canonical Jump Tables", i32 1}