We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 53a3cea commit d8fa2cdCopy full SHA for d8fa2cd
bolt/test/runtime/AArch64/negate-ra-state.cpp
@@ -0,0 +1,26 @@
1
+// REQUIRES: system-linux,bolt-runtime
2
+
3
+// RUN: %clangxx --target=aarch64-unknown-linux-gnu \
4
+// RUN: -mbranch-protection=pac-ret -Wl,-q %s -o %t.exe
5
+// RUN: llvm-bolt %t.exe -o %t.bolt.exe --allow-experimental-pacret
6
+// RUN: %t.bolt.exe | FileCheck %s
7
8
+// CHECK: Exception caught: Exception from bar().
9
10
+#include <cstdio>
11
+#include <stdexcept>
12
13
+void bar() { throw std::runtime_error("Exception from bar()."); }
14
15
+void foo() {
16
+ try {
17
+ bar();
18
+ } catch (const std::exception &e) {
19
+ printf("Exception caught: %s\n", e.what());
20
+ }
21
+}
22
23
+int main() {
24
+ foo();
25
+ return 0;
26
0 commit comments