[PATCH] MS ABI: Implement #pragma vtordisp() and clang-cl /vdN
David Majnemer
david.majnemer at gmail.com
Tue Feb 11 22:08:51 PST 2014
================
Comment at: lib/Driver/Tools.cpp:4051
@@ -4050,1 +4050,3 @@
+ if (Arg *A = Args.getLastArg(options::OPT_vtordisp_mode_EQ))
+ A->render(Args, CmdArgs);
----------------
Reid Kleckner wrote:
> David Majnemer wrote:
> > I didn't think aliases needed special handling.
> They do if the alias targets are not existing driver options. Aliases to existing driver options like -Zi to -g use the rendering of -g elsewhere in Tools.cpp. In this case, we have no handling of -vtordisp-mode=, so I had to add some.
Nevermind, got confused about something else.
================
Comment at: lib/Sema/SemaAttr.cpp:133
@@ -132,4 +132,3 @@
void Sema::AddMsStructLayoutForRecord(RecordDecl *RD) {
- if (!MSStructPragmaOn)
- return;
- RD->addAttr(MsStructAttr::CreateImplicit(Context));
+ if (MSStructPragmaOn) {
+ RD->addAttr(MsStructAttr::CreateImplicit(Context));
----------------
This `if` and the one that follows don't need braces around their statements.
================
Comment at: lib/Sema/SemaDecl.cpp:11214
@@ -11213,3 +11213,3 @@
assert(Tag->isInvalidDecl() && "We should already have completed it");
- if (RecordDecl *RD = dyn_cast<RecordDecl>(Tag))
+ if (RecordDecl *RD = dyn_cast<RecordDecl>(Tag)) {
RD->completeDefinition();
----------------
This change looks superfluous.
================
Comment at: lib/Sema/SemaDecl.cpp:12142
@@ -12140,2 +12141,3 @@
}
+
CXXRecord->completeDefinition(&FinalOverriders);
----------------
As does this one.
http://llvm-reviews.chandlerc.com/D2746
More information about the cfe-commits
mailing list