Purpose of -debug-compile in NVPTX backend

Hi!

My general understanding of the debug symbol support is that:

- the backend defines in the XXXMCAsmInfo class if debug information is supported (e.g. SupportsDebugInformation = true / false)
- if I don't want to output debug information then I can use the (hidden) command line option -disable-debug-info-print (defined in DwarfDebug.cpp).

However, in NVPTXMCAsmInfo.cpp I found:

- a new command line option:

bool CompileForDebugging;
static cl::opt<bool, true>
Debug("debug-compile", cl::desc("Compile for debugging"), cl::Hidden,
       cl::location(CompileForDebugging),
       cl::init(false));

- and the assignment

   SupportsDebugInformation = CompileForDebugging;

Isn't this redundant code? If yes then the attached patch should be committed. If not then I like to know whats going on here....

Regards
Kai

NVPTXMCAsmInfo.diff (1 KB)

Yes, this is a bit redundant. It can be removed for now.