Skip to content

Commit 94f0cd9

Browse files
committed
Last-minute fixes
1 parent 813a75b commit 94f0cd9

File tree

2 files changed

+15
-9
lines changed

2 files changed

+15
-9
lines changed

clang/lib/Basic/Targets/AArch64.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
#include "AArch64.h"
1414
#include "clang/Basic/DiagnosticDriver.h"
1515
#include "clang/Basic/LangOptions.h"
16-
#include "clang/Basic/PointerAuthOptions.h"
1716
#include "clang/Basic/TargetBuiltins.h"
1817
#include "clang/Basic/TargetInfo.h"
1918
#include "llvm/ADT/APSInt.h"

clang/test/CodeGen/ptrauth-cpu-feature.c

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,17 @@
1212
// Test that the following options are still gated on -fptrauth-calls.
1313
// If they are not, in assertion builds they would fail at asm printing time:
1414
//
15-
// RUN: %clang -S -o - -target aarch64-linux-gnu -mcpu=cortex-a72 -fptrauth-init-fini
16-
// RUN: %clang -S -o - -target aarch64-linux-gnu -mcpu=cortex-a72 -fptrauth-function-pointer-type-discrimination
17-
// RUN: %clang -S -o - -target aarch64-linux-gnu -mcpu=cortex-a72 -fptrauth-vtable-pointer-address-discrimination
18-
// RUN: %clang -S -o - -target aarch64-linux-gnu -mcpu=cortex-a72 -fptrauth-vtable-pointer-type-discrimination
19-
// RUN: %clang -S -o - -target aarch64-linux-gnu -mcpu=cortex-a72 -fptrauth-block-descriptor-pointers
15+
// RUN: %clang %s -S -o - -target aarch64-linux-gnu -mcpu=cortex-a72 -fptrauth-init-fini
16+
// RUN: %clang %s -S -o - -target aarch64-linux-gnu -mcpu=cortex-a72 -fptrauth-function-pointer-type-discrimination
17+
// RUN: %clang %s -S -o - -target aarch64-linux-gnu -mcpu=cortex-a72 -fptrauth-vtable-pointer-address-discrimination
18+
// RUN: %clang %s -S -o - -target aarch64-linux-gnu -mcpu=cortex-a72 -fptrauth-vtable-pointer-type-discrimination
19+
// RUN: %clang %s -S -o - -target aarch64-linux-gnu -mcpu=cortex-a72 -fptrauth-block-descriptor-pointers -fblocks -DBLOCKS
2020

2121
// Test that v8.2-compatible code is generated, if possible:
2222
//
2323
// RUN: %clang %s -S -o - -target aarch64-linux-gnu -mcpu=cortex-a72 -msign-return-address=all 2>&1 | FileCheck %s --check-prefix=COMPAT
2424
// RUN: %clang %s -S -o - -target aarch64-linux-gnu -mcpu=cortex-a72 -mbranch-protection=pac-ret 2>&1 | FileCheck %s --check-prefix=COMPAT
25+
// RUN: %clang %s -S -o - -target aarch64-linux-gnu -mcpu=cortex-a72 -mbranch-protection=pac-ret+b-key 2>&1 | FileCheck %s --check-prefix=COMPAT
2526

2627
// arm64e has ptrauth enabled and assumes modern enough CPU by default:
2728
//
@@ -35,15 +36,21 @@ int f(void) {
3536
return 0;
3637
}
3738

39+
#ifdef BLOCKS
40+
int g(int (^bptr)(int)) {
41+
return bptr(42);
42+
}
43+
#endif
44+
3845
// FIXME At now, the error message is printed twice.
3946
// Ideally, this should be fixed, but it seems rather harmless.
4047
//
41-
// FAIL-2: error: A feature is requested that needs CPU with Pointer Authentication support
48+
// FAIL-COUNT-2: error: A feature is requested that needs CPU with Pointer Authentication support
4249

4350
// COMPAT: f:
44-
// COMPAT: hint #25
51+
// COMPAT: hint {{#25|#27}}
4552
//
46-
// COMPAT: hint #29
53+
// COMPAT: hint {{#29|#31}}
4754
// COMPAT: ret
4855

4956
// PAUTH: f:

0 commit comments

Comments
 (0)