Mercurial > hg > CbC > CbC_llvm
view clang/test/CodeGen/cfi-icall-canonical-jump-tables.c @ 150:1d019706d866
LLVM10
author | anatofuz |
---|---|
date | Thu, 13 Feb 2020 15:10:13 +0900 |
parents | |
children | 2e18cbf3894f |
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}