This revision was automatically updated to reflect the committed changes. Closed by commit rG85feebf5a340: [NFC][SanitizeCoverage] Test always_inline functions work (authored by melver).
Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D102929/new/ 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
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
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits