[PATCH] D40218: [Clang] Add __builtin_launder

Eric Fiselier via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Mar 21 13:27:45 PDT 2018


EricWF marked an inline comment as done.
EricWF added inline comments.


================
Comment at: lib/CodeGen/CGBuiltin.cpp:1947-1948
+    const auto *Record = ArgTy->getAsCXXRecordDecl();
+    if (CGM.getCodeGenOpts().StrictVTablePointers && Record &&
+        Record->isDynamicClass())
+      Ptr = Builder.CreateInvariantGroupBarrier(Ptr);
----------------
rsmith wrote:
> I think you also need to catch class types that contain dynamic classes as subobjects.
Only by-value subobjects, or also reference subobjects?


https://reviews.llvm.org/D40218





More information about the cfe-commits mailing list