[PATCH] MS RTTI Generation
David Majnemer
david.majnemer at gmail.com
Tue May 20 09:47:31 PDT 2014
================
Comment at: lib/CodeGen/CGRTTI.cpp:1065-1066
@@ +1064,4 @@
+ const CXXBaseSpecifier *Specifier)
+ : RD(RD), Flags(HasHierarchyDescriptor), VirtualRoot(0), OffsetInVbase(0),
+ NumBases(countNonVirtualBases(RD)) {
+ if (!Parent)
----------------
Initialize these in the order you declare them in the class definition, otherwise clang will warn on this.
================
Comment at: lib/CodeGen/CGRTTI.cpp:1137
@@ +1136,3 @@
+ return llvm::ConstantExpr::getBitCast(TypeDescriptor, CGM.Int8PtrTy);
+ llvm::raw_svector_ostream Out2 = llvm::raw_svector_ostream(TypeInfoString);
+ Mangler.mangleCXXRTTIName(Type, Out2);
----------------
This will not compile with clang, perhaps use the following instead:
llvm::raw_svector_ostream Out2(TypeInfoString);
================
Comment at: lib/CodeGen/CGRTTI.cpp:1155
@@ +1154,3 @@
+llvm::StructType *MSRTTIBuilder::getTypeDescriptorType(StringRef Str) {
+ llvm::SmallString<32> TDTypeName = "MSRTTITypeDescriptor";
+ TDTypeName += Str.size();
----------------
This should be written as such to compile with clang:
llvm::SmallString<32> TDTypeName("MSRTTITypeDescriptor")
http://reviews.llvm.org/D3833
More information about the cfe-commits
mailing list