[PATCH] MS RTTI Generation

Reid Kleckner rnk at google.com
Tue May 20 11:39:13 PDT 2014


================
Comment at: lib/CodeGen/CGRTTI.cpp:1195
@@ +1194,3 @@
+
+bool MSRTTIBuilder::DeclareCompleteObjectLocator() {
+  SmallString<256> MangledName;
----------------
IMO this should return CompleteObjectLocator to reduce statefulness, along with the other Declare* methods.

================
Comment at: lib/CodeGen/CodeGenModule.h:249
@@ -246,2 +248,3 @@
   llvm::LLVMContext &VMContext;
+  MSRTTIBuilder* MSRTTIBuilderObject;
 
----------------
This should be a std::unique_ptr to avoid leaks, if you want to keep this persistent on the CodeGenModule.  You would also need to move the MSRTTIBuilder definition into a header in order to delete it in ~CodeGenModule.

However, it sounds like we might restructure this code.

================
Comment at: lib/CodeGen/CodeGenModule.h:721
@@ +720,3 @@
+
+  /// GetAddrOfGlobalBlock - Gets the address of a block which
+  /// requires no captures.
----------------
@brief instead of the name.  I'm guessing this was the conflict you encountered.

http://reviews.llvm.org/D3833






More information about the cfe-commits mailing list