[PATCH] D36013: Fix logic for generating llvm.type.test()s
Peter Collingbourne via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Jul 28 13:13:42 PDT 2017
pcc accepted this revision.
pcc added a comment.
This revision is now accepted and ready to land.
LGTM
================
Comment at: test/CodeGenCXX/cfi-vcall-no-trap.cpp:2
+// Only output llvm.assume(llvm.type.test()) if cfi-vcall is disabled and whole-program-vtables is enabled
+// RUN: %clang_cc1 -cc1 -fvisibility hidden -fsanitize=cfi-vcall -fwhole-program-vtables -emit-llvm -o - %s | FileCheck --check-prefix=CHECK --check-prefix=CFI %s
+// RUN: %clang_cc1 -cc1 -fvisibility hidden -fwhole-program-vtables -emit-llvm -o - %s | FileCheck --check-prefix=CHECK --check-prefix=NOCFI %s
----------------
I don't think you need the `-cc1` here, it should be implied by `%clang_cc1`.
================
Comment at: test/CodeGenCXX/cfi-vcall-no-trap.cpp:10
+// CHECK: define{{.*}}s1f
+// CFI-NOT: llvm.assume
+// NOCFI: llvm.assume
----------------
I'd also test for presence of `llvm.type.test` to make sure that we're following the non-trapping CFI code path.
https://reviews.llvm.org/D36013
More information about the cfe-commits
mailing list