[PATCH] D102929: [NFC][SanitizeCoverage] Test always_inline functions work
Marco Elver via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri May 21 09:17:01 PDT 2021
melver created this revision.
melver added a reviewer: vitalybuka.
melver requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.
Test that always_inline functions are instrumented as expected.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D102929
Files:
clang/test/CodeGen/sanitize-coverage.c
Index: clang/test/CodeGen/sanitize-coverage.c
===================================================================
--- clang/test/CodeGen/sanitize-coverage.c
+++ clang/test/CodeGen/sanitize-coverage.c
@@ -19,4 +19,16 @@
if (n)
x[n] = 42;
}
+
+static inline __attribute__((__always_inline__)) void always_inlined_fn(int n) {
+ if (n)
+ x[n] = 42;
+}
+// CHECK-LABEL: define dso_local void @test_always_inline(
+void test_always_inline(int n) {
+ // CHECK-DAG: call void @__sanitizer_cov_trace_pc
+ // CHECK-DAG: call void @__sanitizer_cov_trace_const_cmp
+ always_inlined_fn(n);
+}
+
// CHECK-LABEL: declare void
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D102929.347057.patch
Type: text/x-patch
Size: 628 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20210521/74b736a2/attachment-0001.bin>
More information about the cfe-commits
mailing list