llvm-project/clang/test/CodeGen/cfi-check-attrs.c
Pavel Kosov 373d875514
[cfi][CodeGen] Call SetLLVMFunctionAttributes{,ForDefinition} on __cf… (#78253)
…i_check

This causes __cfi_check, just as __cfi_check_fail, to get the proper
target-specific attributes, in particular uwtable for unwind table
generation. Previously, nounwind attribute could be inferred for
__cfi_check, which caused it to lose its unwind table even with
-funwind-table option.

~~

Huawei RRI, OS Lab

Co-authored-by: Nikolai Kholiavin <kholiavin.nikolai@huawei-partners.com>
2024-03-27 03:25:33 +03:00

6 lines
247 B
C

// RUN: %clang_cc1 -triple arm-unknown-linux -funwind-tables=1 -fsanitize-cfi-cross-dso -emit-llvm -o - %s | FileCheck %s
// CHECK: define weak {{.*}}void @__cfi_check({{.*}} [[ATTR:#[0-9]*]]
// CHECK: attributes [[ATTR]] = {{.*}} uwtable(sync)