ABataev marked 4 inline comments as done. ABataev added inline comments.
================ Comment at: lib/Driver/ToolChains/Cuda.cpp:282-285 enum DebugInfoKind { - NoDebug, /// No debug info. - LineTableOnly, /// Line tables only. - FullDebug /// Full debug info. + NoDebug, /// No debug info. + DebugDirectivesOnly, /// Line tables only. + FullDebug, /// Full debug info. ---------------- echristo wrote: > This enum doesn't appear to be complete? Either way can you make it match the > other and document what each thing means a bit more? No, it is complete, but probably has some wrong names. I reworked it. Actually, this enum is intended to track the debug info emitted for the device. It may be disabled, debug directives only or same debug info as for the host. ================ Comment at: lib/Driver/ToolChains/Cuda.cpp:289 static DebugInfoKind mustEmitDebugInfo(const ArgList &Args) { + const Arg *A = Args.getLastArg(options::OPT_O_Group); ---------------- echristo wrote: > Please document this routine in prose. Added description. ================ Comment at: lib/Driver/ToolChains/Cuda.cpp:706-708 +void CudaToolChain::adjustDebugInfoKind( + codegenoptions::DebugInfoKind &DebugInfoKind, const ArgList &Args) const { + switch (mustEmitDebugInfo(Args)) { ---------------- echristo wrote: > Is this really doing anything? Yes, actually it does. Currently, when we need to emit the code for the device, we use the same debug info level just like for the host. But in some situations, we need to disable it or emit only debug directives for the device, while keeping the original debug info for the host. This function allows us to change the debug info level for the device and force clang to emit required debug info data during codegen for the NVPTX devices. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D51554/new/ https://reviews.llvm.org/D51554 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits