[PATCH] D75215: [DebugInfo] Fix for adding "returns cxx udt" option to functions in CodeView.

2020-03-05 Thread Amy Huang via Phabricator via cfe-commits
akhuang marked an inline comment as done and an inline comment as not done. akhuang added inline comments. Comment at: llvm/include/llvm/IR/DebugInfoFlags.def:61 HANDLE_DI_FLAG((1 << 29), AllCallsDescribed) +HANDLE_DI_FLAG((1 << 30), CxxReturnUdt) akhuang

[PATCH] D75215: [DebugInfo] Fix for adding "returns cxx udt" option to functions in CodeView.

2020-03-05 Thread Amy Huang via Phabricator via cfe-commits
akhuang marked an inline comment as done. akhuang added inline comments. Comment at: llvm/include/llvm/IR/DebugInfoFlags.def:61 HANDLE_DI_FLAG((1 << 29), AllCallsDescribed) +HANDLE_DI_FLAG((1 << 30), CxxReturnUdt) rnk wrote: > aprantl wrote: > > dblaikie

[PATCH] D75215: [DebugInfo] Fix for adding "returns cxx udt" option to functions in CodeView.

2020-03-04 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added inline comments. Comment at: llvm/include/llvm/IR/DebugInfoFlags.def:61 HANDLE_DI_FLAG((1 << 29), AllCallsDescribed) +HANDLE_DI_FLAG((1 << 30), CxxReturnUdt) aprantl wrote: > dblaikie wrote: > > rnk wrote: > > > @dblaikie @aprantl, does this seem

[PATCH] D75215: [DebugInfo] Fix for adding "returns cxx udt" option to functions in CodeView.

2020-03-04 Thread Adrian Prantl via Phabricator via cfe-commits
aprantl added inline comments. Comment at: llvm/include/llvm/IR/DebugInfoFlags.def:61 HANDLE_DI_FLAG((1 << 29), AllCallsDescribed) +HANDLE_DI_FLAG((1 << 30), CxxReturnUdt) dblaikie wrote: > rnk wrote: > > @dblaikie @aprantl, does this seem like a reasonable

[PATCH] D75215: [DebugInfo] Fix for adding "returns cxx udt" option to functions in CodeView.

2020-03-04 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added inline comments. Comment at: llvm/include/llvm/IR/DebugInfoFlags.def:61 HANDLE_DI_FLAG((1 << 29), AllCallsDescribed) +HANDLE_DI_FLAG((1 << 30), CxxReturnUdt) rnk wrote: > @dblaikie @aprantl, does this seem like a reasonable flag to add, or

[PATCH] D75215: [DebugInfo] Fix for adding "returns cxx udt" option to functions in CodeView.

2020-03-03 Thread Amy Huang via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG5b3b21f02588: [DebugInfo] Fix for adding returns cxx udt option to functions in CodeView. (authored by akhuang). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D75215: [DebugInfo] Fix for adding "returns cxx udt" option to functions in CodeView.

2020-03-03 Thread Amy Huang via Phabricator via cfe-commits
akhuang updated this revision to Diff 248025. akhuang added a comment. remove tests Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75215/new/ https://reviews.llvm.org/D75215 Files: llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp

[PATCH] D75215: [DebugInfo] Fix for adding "returns cxx udt" option to functions in CodeView.

2020-03-03 Thread Reid Kleckner via Phabricator via cfe-commits
rnk accepted this revision. rnk added a comment. lgtm, but please remove the clang test update from this patch, since it shouldn't pass yet. Comment at: clang/test/CodeGenCXX/debug-info-flag-nontrivial.cpp:1 +// RUN: %clang_cc1 -emit-llvm -gcodeview -debug-info-kind=limited

[PATCH] D75215: [DebugInfo] Fix for adding "returns cxx udt" option to functions in CodeView.

2020-03-03 Thread Amy Huang via Phabricator via cfe-commits
akhuang marked an inline comment as done. akhuang added inline comments. Comment at: clang/lib/CodeGen/CGDebugInfo.cpp:989 + llvm::DINode::DIFlags Flags = llvm::DINode::FlagFwdDecl; + if (const CXXRecordDecl *CXXRD = dyn_cast(RD)) +if (!CXXRD->hasDefinition() ||

[PATCH] D75215: [DebugInfo] Fix for adding "returns cxx udt" option to functions in CodeView.

2020-03-03 Thread Amy Huang via Phabricator via cfe-commits
akhuang updated this revision to Diff 248001. akhuang added a comment. Splitting the forward declaration flag into a different review. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75215/new/ https://reviews.llvm.org/D75215 Files:

[PATCH] D75215: [DebugInfo] Fix for adding "returns cxx udt" option to functions in CodeView.

2020-03-03 Thread Amy Huang via Phabricator via cfe-commits
akhuang updated this revision to Diff 248003. akhuang added a comment. add back line in test that accidentally got deleted Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75215/new/ https://reviews.llvm.org/D75215 Files:

[PATCH] D75215: [DebugInfo] Fix for adding "returns cxx udt" option to functions in CodeView.

2020-03-03 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added a comment. I think we should commit the change to clang separately from the first one you made to LLVM to handle method types. Setting flags on forward declarations is something I'd like to get additional input on before landing. Comment at:

[PATCH] D75215: [DebugInfo] Fix for adding "returns cxx udt" option to functions in CodeView.

2020-03-03 Thread Amy Huang via Phabricator via cfe-commits
akhuang added a comment. In D75215#1901961 , @rnk wrote: > BTW, I am curious to know if this helps V8 PDB size. IIRC you said there were > some PDBs in Chrome that have this problem a lot. I think I just noticed that the PDB size increased after

[PATCH] D75215: [DebugInfo] Fix for adding "returns cxx udt" option to functions in CodeView.

2020-03-03 Thread Amy Huang via Phabricator via cfe-commits
akhuang updated this revision to Diff 247937. akhuang added a comment. update tests Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75215/new/ https://reviews.llvm.org/D75215 Files: clang/lib/CodeGen/CGDebugInfo.cpp

[PATCH] D75215: [DebugInfo] Fix for adding "returns cxx udt" option to functions in CodeView.

2020-03-02 Thread Amy Huang via Phabricator via cfe-commits
akhuang updated this revision to Diff 247774. akhuang added a comment. Add FlagNonTrivial to fwd declared records in CGDebugInfo Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75215/new/ https://reviews.llvm.org/D75215 Files:

[PATCH] D75215: [DebugInfo] Fix for adding "returns cxx udt" option to functions in CodeView.

2020-03-02 Thread Amy Huang via Phabricator via cfe-commits
akhuang added a comment. In D75215#1899224 , @rnk wrote: > Now that I've gone this far... maybe we should just say `isNonTrivial() || > isFwdDecl()` -> mark it CxxReturnUdt. Something like that. I just tried this but apparently it ends up marking

[PATCH] D75215: [DebugInfo] Fix for adding "returns cxx udt" option to functions in CodeView.

2020-03-02 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added a comment. BTW, I am curious to know if this helps V8 PDB size. IIRC you said there were some PDBs in Chrome that have this problem a lot. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75215/new/ https://reviews.llvm.org/D75215

[PATCH] D75215: [DebugInfo] Fix for adding "returns cxx udt" option to functions in CodeView.

2020-02-28 Thread Reid Kleckner via Phabricator via cfe-commits
rnk accepted this revision. rnk added a comment. This revision is now accepted and ready to land. lgtm! So, presumably we still do the wrong thing in the non-method type cases. I came up with this, where we differ with MSVC: struct NonTrivial { NonTrivial(); NonTrivial(const

[PATCH] D75215: [DebugInfo] Fix for adding "returns cxx udt" option to functions in CodeView.

2020-02-27 Thread Amy Huang via Phabricator via cfe-commits
akhuang updated this revision to Diff 247104. akhuang added a comment. Just change CodeViewDebug to add CxxReturnUdt to all methods that return a record type, which appears to be consistent with what msvc does and avoids emitting two versions of the method in the pdb file. Repository: rG

[PATCH] D75215: [DebugInfo] Fix for adding "returns cxx udt" option to functions in CodeView.

2020-02-26 Thread Amy Huang via Phabricator via cfe-commits
akhuang marked an inline comment as done. akhuang added inline comments. Comment at: clang/lib/CodeGen/CGDebugInfo.cpp:992 getTagForRecord(RD), RDName, Ctx, DefUnit, Line, 0, Size, Align, llvm::DINode::FlagFwdDecl, Identifier); if

[PATCH] D75215: [DebugInfo] Fix for adding "returns cxx udt" option to functions in CodeView.

2020-02-26 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added inline comments. Comment at: clang/lib/CodeGen/CGDebugInfo.cpp:992 getTagForRecord(RD), RDName, Ctx, DefUnit, Line, 0, Size, Align, llvm::DINode::FlagFwdDecl, Identifier); if (CGM.getCodeGenOpts().DebugFwdTemplateParams) One

[PATCH] D75215: [DebugInfo] Fix for adding "returns cxx udt" option to functions in CodeView.

2020-02-26 Thread Amy Huang via Phabricator via cfe-commits
akhuang created this revision. akhuang added reviewers: rnk, asmith. Herald added subscribers: llvm-commits, cfe-commits, hiraditya. Herald added projects: clang, LLVM. This change checks for the return type in the frontend and adds a flag to the DISubroutineType to indicate that the option