[PATCH] D43838: [CodeView] Initial support for emitting S_THUNK32 symbols for compiler-generated thunk routines

Reid Kleckner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 13 10:58:01 PDT 2018


rnk accepted this revision.
rnk added a comment.
This revision is now accepted and ready to land.

lgtm



================
Comment at: llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp:2430
+  // Thunks are compiler-generated and probably won't have source correlation.
+  if (!CurFn->HaveLineInfo && !GV.getSubprogram()->isThunk()) {
     FnDebugInfo.erase(&GV);
----------------
bwyma wrote:
> Some thunks are (correctly) not given any source correlation by CLANG.  When this happens it does not have line info and the entire thunk was being thrown away here.  This change prevents the compiler from throwing away the thunk.
I think this might be a hold-over from when the only reason we emitted ProcSym records was for line table info. We might want to re-evaluate this check completely at some point, but for now, sounds good.


https://reviews.llvm.org/D43838





More information about the llvm-commits mailing list