summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGenCXX/invariant.group-for-vptrs.cpp
diff options
context:
space:
mode:
authorPiotr Padlewski <prazek@google.com>2015-10-02 22:12:40 +0000
committerPiotr Padlewski <prazek@google.com>2015-10-02 22:12:40 +0000
commit276a78d860cbe376202d3251a1f490b0da7f2f7e (patch)
treeef6ac2f6a4e0b0b69d1d75731586decdb58f5fc4 /clang/test/CodeGenCXX/invariant.group-for-vptrs.cpp
parentdc9b2cfc5013684456ec7d632eaa2edf7c030f2b (diff)
downloadbcm5719-llvm-276a78d860cbe376202d3251a1f490b0da7f2f7e.tar.gz
bcm5719-llvm-276a78d860cbe376202d3251a1f490b0da7f2f7e.zip
Emiting invariant.group.barrier for ctors bugfix
Ensure that the vptr store in the most-derived constructor is not behind an invariant group barrier. Previously, the base-most vptr store would be the one behind no barrier, and that could result in the creator of the object thinking it had the base-most vtable. This bug caused clang call pure virtual functions when called from constructor body. http://reviews.llvm.org/D13373 llvm-svn: 249197
Diffstat (limited to 'clang/test/CodeGenCXX/invariant.group-for-vptrs.cpp')
-rw-r--r--clang/test/CodeGenCXX/invariant.group-for-vptrs.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/clang/test/CodeGenCXX/invariant.group-for-vptrs.cpp b/clang/test/CodeGenCXX/invariant.group-for-vptrs.cpp
index 7e85fa20d5d..ca737ee23fb 100644
--- a/clang/test/CodeGenCXX/invariant.group-for-vptrs.cpp
+++ b/clang/test/CodeGenCXX/invariant.group-for-vptrs.cpp
@@ -56,9 +56,8 @@ void testInternallyVisible(bool p) {
// Checking D::D()
// CHECK-LABEL: define linkonce_odr void @_ZN1DC2Ev(
-
-// CHECK: call void @_ZN1AC2Ev(%struct.A*
// CHECK: = call i8* @llvm.invariant.group.barrier(i8*
+// CHECK: call void @_ZN1AC2Ev(%struct.A*
// CHECK: store {{.*}} !invariant.group ![[D_MD]]
// Checking B::B()
OpenPOWER on IntegriCloud