summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST/MicrosoftMangle.cpp
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
commit5c2b4ea662e5cd9be6103caad416bcd2dc2039ea (patch)
treef1749bbec709c8db757af1e749b6a0ad8466fe21 /clang/lib/AST/MicrosoftMangle.cpp
parent2be4a2829738b46fd887f911a7ea177baf2092d4 (diff)
downloadbcm5719-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/AST/MicrosoftMangle.cpp')
-rw-r--r--clang/lib/AST/MicrosoftMangle.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/clang/lib/AST/MicrosoftMangle.cpp b/clang/lib/AST/MicrosoftMangle.cpp
index 58e14919810..d064b157719 100644
--- a/clang/lib/AST/MicrosoftMangle.cpp
+++ b/clang/lib/AST/MicrosoftMangle.cpp
@@ -113,7 +113,7 @@ public:
void mangleCXXRTTI(QualType T, raw_ostream &Out) override;
void mangleCXXRTTIName(QualType T, raw_ostream &Out) override;
void mangleCXXRTTIBaseClassDescriptor(const CXXRecordDecl *Derived,
- uint32_t NVOffset, uint32_t VBPtrOffset,
+ uint32_t NVOffset, int32_t VBPtrOffset,
uint32_t VBTableOffset, uint32_t Flags,
raw_ostream &Out) override;
void mangleCXXRTTIBaseClassArray(const CXXRecordDecl *Derived,
@@ -2258,7 +2258,7 @@ void MicrosoftMangleContextImpl::mangleCXXRTTIName(QualType T,
}
void MicrosoftMangleContextImpl::mangleCXXRTTIBaseClassDescriptor(
- const CXXRecordDecl *Derived, uint32_t NVOffset, uint32_t VBPtrOffset,
+ const CXXRecordDecl *Derived, uint32_t NVOffset, int32_t VBPtrOffset,
uint32_t VBTableOffset, uint32_t Flags, raw_ostream &Out) {
MicrosoftCXXNameMangler Mangler(*this, Out);
Mangler.getStream() << "\01??_R1";
@@ -2267,7 +2267,7 @@ void MicrosoftMangleContextImpl::mangleCXXRTTIBaseClassDescriptor(
Mangler.mangleNumber(VBTableOffset);
Mangler.mangleNumber(Flags);
Mangler.mangleName(Derived);
- Mangler.getStream() << "@8";
+ Mangler.getStream() << "8";
}
void MicrosoftMangleContextImpl::mangleCXXRTTIBaseClassArray(
@@ -2275,7 +2275,7 @@ void MicrosoftMangleContextImpl::mangleCXXRTTIBaseClassArray(
MicrosoftCXXNameMangler Mangler(*this, Out);
Mangler.getStream() << "\01??_R2";
Mangler.mangleName(Derived);
- Mangler.getStream() << "@8";
+ Mangler.getStream() << "8";
}
void MicrosoftMangleContextImpl::mangleCXXRTTIClassHierarchyDescriptor(
@@ -2283,7 +2283,7 @@ void MicrosoftMangleContextImpl::mangleCXXRTTIClassHierarchyDescriptor(
MicrosoftCXXNameMangler Mangler(*this, Out);
Mangler.getStream() << "\01??_R3";
Mangler.mangleName(Derived);
- Mangler.getStream() << "@8";
+ Mangler.getStream() << "8";
}
void MicrosoftMangleContextImpl::mangleCXXRTTICompleteObjectLocator(
OpenPOWER on IntegriCloud