[PATCH] [-cxx-abi microsoft] Emit thunks for pointers to virtual member functions

Timur Iskhodzhanov timurrrr at google.com
Wed Nov 13 11:39:34 PST 2013



================
Comment at: lib/CodeGen/MicrosoftCXXABI.cpp:1972
@@ +1971,3 @@
+  CGF.FinishFunction();
+  CGM.setFunctionLinkage(MD, ThunkFn); // XXX: Do we need this?
+
----------------
Reid Kleckner wrote:
> Timur Iskhodzhanov wrote:
> > Isn't this copying the function's linkage over to the thunk?
> > Don't you get "symbol already defined" if you link two TUs generating the same thunk together?
> These should be merged like inline functions.  They should be linkonce_odr for externally visible types and internal for internal types.  We probably have logic for that somewhere.
I don't see this in the lit test expectations:

  define x86_thiscallcc void @"\01??_9C@@$B7AE"


http://llvm-reviews.chandlerc.com/D2104



More information about the cfe-commits mailing list