diff options
author | Piotr Padlewski <prazek@google.com> | 2015-08-27 21:35:41 +0000 |
---|---|---|
committer | Piotr Padlewski <prazek@google.com> | 2015-08-27 21:35:41 +0000 |
commit | 3e3b23e283a01c27838620db2aaae56aea621ef0 (patch) | |
tree | 18b4801d2cd86b0f5063e75793b20b95cf07f8a9 /lib/CodeGen/CGCXXABI.h | |
parent | b50aff8739667e100bca22d3a62bcaba9709ec48 (diff) |
Assume loads fix #2
There was linker problem, and it turns out that it is not always safe
to refer to vtable. If the vtable is used, then we can refer to it
without any problem, but because we don't know when it will be used or
not, we can only check if vtable is external or it is safe to to emit it
speculativly (when class it doesn't have any inline virtual functions).
It should be fixed in the future.
http://reviews.llvm.org/D12385
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@246214 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGCXXABI.h')
-rw-r--r-- | lib/CodeGen/CGCXXABI.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/CodeGen/CGCXXABI.h b/lib/CodeGen/CGCXXABI.h index 158d29ab51..259c878f7f 100644 --- a/lib/CodeGen/CGCXXABI.h +++ b/lib/CodeGen/CGCXXABI.h @@ -218,8 +218,10 @@ public: virtual void emitThrow(CodeGenFunction &CGF, const CXXThrowExpr *E) = 0; virtual llvm::GlobalVariable *getThrowInfo(QualType T) { return nullptr; } - virtual bool canEmitAvailableExternallyVTable( - const CXXRecordDecl *RD) const = 0; + /// \brief Determine whether it's possible to emit a vtable for \p RD, even + /// though we do not know that the vtable has been marked as used by semantic + /// analysis. + virtual bool canSpeculativelyEmitVTable(const CXXRecordDecl *RD) const = 0; virtual void emitBeginCatch(CodeGenFunction &CGF, const CXXCatchStmt *C) = 0; |