diff options
author | Peter Collingbourne <peter@pcc.me.uk> | 2015-07-09 19:56:14 +0000 |
---|---|---|
committer | Peter Collingbourne <peter@pcc.me.uk> | 2015-07-09 19:56:14 +0000 |
commit | e57064428566724b7786f5e22553a06cc5f5887f (patch) | |
tree | 318bf55b052321b4dcd6f2ea2994245b793c019b /clang/lib/CodeGen/CodeGenModule.h | |
parent | 60541c1d44b1b85baa0d69d34bce61f2ffd416ca (diff) | |
download | bcm5719-llvm-e57064428566724b7786f5e22553a06cc5f5887f.tar.gz bcm5719-llvm-e57064428566724b7786f5e22553a06cc5f5887f.zip |
CFI: Emit correct bit set information if RTTI is disabled under MS ABI.
We were previously creating bit set entries at virtual table offset
sizeof(void*) unconditionally under the Microsoft C++ ABI. This is incorrect
if RTTI data is disabled; in that case the "address point" is at offset
0. This change modifies bit set emission to take into account whether RTTI
data is being emitted.
Also make a start on a blacklisting scheme for records.
Differential Revision: http://reviews.llvm.org/D11048
llvm-svn: 241845
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.h')
-rw-r--r-- | clang/lib/CodeGen/CodeGenModule.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/CodeGenModule.h b/clang/lib/CodeGen/CodeGenModule.h index 9a295feaffa..dd167a29f5a 100644 --- a/clang/lib/CodeGen/CodeGenModule.h +++ b/clang/lib/CodeGen/CodeGenModule.h @@ -1126,6 +1126,10 @@ public: /// \param D Threadprivate declaration. void EmitOMPThreadPrivateDecl(const OMPThreadPrivateDecl *D); + /// Returns whether the given record is blacklisted from control flow + /// integrity checks. + bool IsCFIBlacklistedRecord(const CXXRecordDecl *RD); + /// Emit bit set entries for the given vtable using the given layout if /// vptr CFI is enabled. void EmitVTableBitSetEntries(llvm::GlobalVariable *VTable, |