]> granicus.if.org Git - clang/commit
Emiting invariant.group.barrier for ctors bugfix
authorPiotr Padlewski <prazek@google.com>
Fri, 2 Oct 2015 22:12:40 +0000 (22:12 +0000)
committerPiotr Padlewski <prazek@google.com>
Fri, 2 Oct 2015 22:12:40 +0000 (22:12 +0000)
commitb616928f434e7980e8cf1e834e15a007b4561b84
treed71f382ee2a06bfcd4aa05eac45461feee7eb9b4
parente9c854387a9d993adf64bae0e0fdda074009cc4f
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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@249197 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/CGClass.cpp
test/CodeGenCXX/invariant.group-for-vptrs.cpp
test/CodeGenCXX/strict-vtable-pointers.cpp