summaryrefslogtreecommitdiff
path: root/lib/CodeGen/CodeGenModule.h
diff options
context:
space:
mode:
authorWarren Hunt <whunt@google.com>2014-05-23 16:07:43 +0000
committerWarren Hunt <whunt@google.com>2014-05-23 16:07:43 +0000
commit7ed2a9805972a0eb9a1e0f8eb6e9fe42689e7efd (patch)
tree255b3cb911355cb93ba783ab5710fe774a95a946 /lib/CodeGen/CodeGenModule.h
parent0ddd258c374240c22a53e3e71200048ec3a64284 (diff)
downloadclang-7ed2a9805972a0eb9a1e0f8eb6e9fe42689e7efd.tar.gz
clang-7ed2a9805972a0eb9a1e0f8eb6e9fe42689e7efd.tar.bz2
clang-7ed2a9805972a0eb9a1e0f8eb6e9fe42689e7efd.tar.xz
[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 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@209523 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CodeGenModule.h')
-rw-r--r--lib/CodeGen/CodeGenModule.h13
1 files changed, 11 insertions, 2 deletions
diff --git a/lib/CodeGen/CodeGenModule.h b/lib/CodeGen/CodeGenModule.h
index 7b467291e4..eff51cea8b 100644
--- a/lib/CodeGen/CodeGenModule.h
+++ b/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);