[PATCH] D18808: Use the NoDebug emission kind to identify compile units that no debug info should be created from.

Duncan P. N. Exon Smith via cfe-commits cfe-commits at lists.llvm.org
Tue Apr 5 21:35:14 PDT 2016

IR changes LGTM, if you add the missing verifier check (I'm surprised
this *ever* passed the verifier...)

Someone else will have to look at DwarfDebug.cpp.

> On 2016-Apr-05, at 16:55, Adrian Prantl <aprantl at apple.com> wrote:
> aprantl created this revision.
> aprantl added reviewers: dblaikie, echristo, dexonsmith.
> aprantl added subscribers: davide, llvm-commits, cfe-commits.
> aprantl set the repository for this revision to rL LLVM.
> As indicated in D18612, sample-based profiling and optimization remarks currently remove DICompileUnits from llvm.dbg.cu to suppress the emission of debug info from them. This is somewhat of a hack and only borderline legal IR.
> This patch uses the recently introduced NoDebug emission kind in DICompileUnit to achieve the same result without breaking the Verifier. A nice side-effect of this change is that it is now possible to combine NoDebug and regular compile units under LTO.
> For simplicity I combined the llvm and cfe patches into one review.
> Repository:
>  rL LLVM
> http://reviews.llvm.org/D18808
> Files:
>  include/llvm/IR/DIBuilder.h
>  lib/CodeGen/AsmPrinter/DwarfDebug.cpp
>  lib/IR/DIBuilder.cpp
>  test/DebugInfo/X86/mixed-nodebug-cu.ll
>  tools/clang/lib/CodeGen/CGDebugInfo.cpp
>  tools/clang/test/Frontend/optimization-remark.c
>  tools/clang/test/Frontend/profile-sample-use-loc-tracking.c
> <D18808.52745.patch>

More information about the cfe-commits mailing list