diff options
author | Warren Hunt <whunt@google.com> | 2014-05-23 16:07:43 +0000 |
---|---|---|
committer | Warren Hunt <whunt@google.com> | 2014-05-23 16:07:43 +0000 |
commit | 5c2b4ea662e5cd9be6103caad416bcd2dc2039ea (patch) | |
tree | f1749bbec709c8db757af1e749b6a0ad8466fe21 /clang/lib/CodeGen/CodeGenModule.h | |
parent | 2be4a2829738b46fd887f911a7ea177baf2092d4 (diff) | |
download | bcm5719-llvm-5c2b4ea662e5cd9be6103caad416bcd2dc2039ea.tar.gz bcm5719-llvm-5c2b4ea662e5cd9be6103caad416bcd2dc2039ea.zip |
[MS-ABI] Implements MS-compatible RTTI
Enables the emission of MS-compatible RTTI data structures for use with
typeid, dynamic_cast and exceptions. Does not implement dynamic_cast
or exceptions. As an artiface, typeid works in some cases but proper
support an testing will coming in a subsequent patch.
majnemer has fuzzed the results. Test cases included.
Differential Revision: http://reviews.llvm.org/D3833
llvm-svn: 209523
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.h')
-rw-r--r-- | clang/lib/CodeGen/CodeGenModule.h | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/clang/lib/CodeGen/CodeGenModule.h b/clang/lib/CodeGen/CodeGenModule.h index 7b467291e42..eff51cea8bd 100644 --- a/clang/lib/CodeGen/CodeGenModule.h +++ b/clang/lib/CodeGen/CodeGenModule.h @@ -528,10 +528,10 @@ public: AtomicGetterHelperFnMap[Ty] = Fn; } - llvm::Constant *getTypeDescriptor(QualType Ty) { + llvm::Constant *getTypeDescriptorFromMap(QualType Ty) { return TypeDescriptorMap[Ty]; } - void setTypeDescriptor(QualType Ty, llvm::Constant *C) { + void setTypeDescriptorInMap(QualType Ty, llvm::Constant *C) { TypeDescriptorMap[Ty] = C; } @@ -710,6 +710,12 @@ public: /// The type of a generic block literal. llvm::Type *getGenericBlockLiteralType(); + /// \brief Gets or a creats a Microsoft TypeDescriptor. + llvm::Constant *getMSTypeDescriptor(QualType Ty); + /// \brief Gets or a creats a Microsoft CompleteObjectLocator. + llvm::GlobalVariable *getMSCompleteObjectLocator(const CXXRecordDecl *RD, + const VPtrInfo *Info); + /// Gets the address of a block which requires no captures. llvm::Constant *GetAddrOfGlobalBlock(const BlockExpr *BE, const char *); @@ -945,6 +951,9 @@ public: F->setLinkage(getFunctionLinkage(GD)); } + /// \brief Returns the appropriate linkage for the TypeInfo struct for a type. + llvm::GlobalVariable::LinkageTypes getTypeInfoLinkage(QualType Ty); + /// Return the appropriate linkage for the vtable, VTT, and type information /// of the given class. llvm::GlobalVariable::LinkageTypes getVTableLinkage(const CXXRecordDecl *RD); |