================
@@ -0,0 +1,58 @@
+// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py
UTC_ARGS: --version 6
+//
+// Test optimization pipelines do not interfere with AllocToken lowering, and
we
+// pass on function attributes correctly.
+//
+// RUN: %clang_cc1 -fsanitize=alloc-token -triple x86_64-linux-gnu
-emit-llvm %s -o - | FileCheck --check-prefix=CHECK-O0 %s
+// RUN: %clang_cc1 -O1 -fsanitize=alloc-token -triple x86_64-linux-gnu
-emit-llvm %s -o - | FileCheck --check-prefix=CHECK-O1 %s
+// RUN: %clang_cc1 -O2 -fsanitize=alloc-token -triple x86_64-linux-gnu
-emit-llvm %s -o - | FileCheck --check-prefix=CHECK-O2 %s
+
+typedef __typeof(sizeof(int)) size_t;
+
+void *malloc(size_t size);
+
+// CHECK-O0-LABEL: define dso_local ptr @test_malloc(
+// CHECK-O0-SAME: ) #[[ATTR0:[0-9]+]] {
+// CHECK-O0-NEXT: [[ENTRY:.*:]]
+// CHECK-O0-NEXT: [[TMP0:%.*]] = call ptr @__alloc_token_malloc(i64 noundef
4, i64 0) #[[ATTR3:[0-9]+]]
----------------
zmodem wrote:
Here's another check for an attribute, but it's not clear what attribute that
is, or if it's important.
https://github.com/llvm/llvm-project/pull/156839
_______________________________________________
llvm-branch-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits