[PATCH] CodeGen: Refactor RTTI emission
Reid Kleckner
rnk at google.com
Mon Jun 23 14:48:29 PDT 2014
================
Comment at: include/clang/AST/Type.h:1458
@@ +1457,3 @@
+ /// an incomplete class type.
+ /// is an indirect or direct pointer to an incomplete class type.
+ bool containsIncompleteClassType() const;
----------------
Stray comment?
================
Comment at: lib/CodeGen/CodeGenModule.cpp:3390-3391
@@ +3389,4 @@
+ return llvm::GlobalValue::WeakODRLinkage;
+ if (RD->isDynamicClass())
+ return getVTableLinkage(RD);
+ }
----------------
Not part of this change, but note this linkage is incorrect for dllimport classes: http://llvm.org/PR20106
================
Comment at: lib/CodeGen/ItaniumCXXABI.cpp:1950
@@ +1949,3 @@
+
+namespace {
+class ItaniumRTTIBuilder {
----------------
Looks like the Itanium code paths weigh in at ~900 lines and the MS ones at ~500. That's kind of my internal threshold for "this deserves it's own file". IIRC you considered but rejected ItaniumRTTI.cpp. Why? I don't see any problem with a lib/CodeGen/ItaniumRTTI.h that exposes some free functions that ItaniumCXXABI calls to.
================
Comment at: lib/CodeGen/MicrosoftCXXABI.cpp:2783
@@ +2782,3 @@
+
+/// \brief Gets or a creats a Microsoft CompleteObjectLocator.
+llvm::GlobalVariable *
----------------
"creats"
http://reviews.llvm.org/D4261
More information about the cfe-commits
mailing list