[DEBUG_INFO][NVPTX]Emit empty .debug_loc section in presence of the debug option.
authorAlexey Bataev <a.bataev@hotmail.com>
Fri, 8 Mar 2019 20:08:04 +0000 (20:08 +0000)
committerAlexey Bataev <a.bataev@hotmail.com>
Fri, 8 Mar 2019 20:08:04 +0000 (20:08 +0000)
commit78fcb8381fea0c754bdb23c107dce536fd0b2437
treea9bd0321455f8d6936c6adbdd31b2db8c0db7907
parent57b38a8593bd7d63b9db09676087365d8d3d0d8a
[DEBUG_INFO][NVPTX]Emit empty .debug_loc section in presence of the debug option.

Summary:
If the LLVM module shows that it has debug info, but the file is
actually empty and the real debug info is not emitted, the ptxas tool
emits error 'Debug information not found in presence of .target debug'.
We need at leas one empty debug section to silence this message. Section
`.debug_loc` is not emitted for PTX and we can emit empty `.debug_loc`
section if `debug` option was emitted.

Reviewers: tra

Subscribers: jholewinski, aprantl, llvm-commits

Differential Revision: https://reviews.llvm.org/D57250

llvm-svn: 355719
llvm/lib/Target/NVPTX/NVPTXAsmPrinter.cpp
llvm/test/DebugInfo/NVPTX/debug-empty.ll