Previously we were not assigning a comdat to thunks in the Microsoft
ABI, which
would have required us to emit these functions outside of a comdat.
(Due to an inconsistency in how we were emitting objects, we
were getting this right most of the time, but only when compiling
without function sections.) This code generator change causes
us to create a comdat for each thunk.
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
Comment Actions
Can't this be fixed by moving the call of CGM.getCXXABI().setThunkLinkage in CodeGenVTables::emitThunk to CodeGenFunction::GenerateThunk right after the call to CGM.setFunctionLinkage?
Comment Actions
Would that do the right thing with varargs thunks?
It seems that moving the call to setComdat to emitThunk would do the right thing.