Add a -gmodules option to the driver and a -dwarf-ext-refs to cc1

to enable the use of external type references in the debug info
(a.k.a. module debugging).

The driver expands -gmodules to "-g -fmodule-format=obj -dwarf-ext-refs"
and passes that to cc1. All this does at the moment is set a flag
codegenopts.

http://reviews.llvm.org/D11958

llvm-svn: 246192
This commit is contained in:
Adrian Prantl
2015-08-27 19:46:20 +00:00
parent ed6eab32b3
commit 6b21ab21d1
16 changed files with 49 additions and 14 deletions

View File

@@ -64,6 +64,7 @@ public:
// ThreadModel, but the backend expects them to be nonempty.
CodeGenOpts.CodeModel = "default";
CodeGenOpts.ThreadModel = "single";
CodeGenOpts.DebugTypeExtRefs = true;
CodeGenOpts.setDebugInfo(CodeGenOptions::FullDebugInfo);
CodeGenOpts.SplitDwarfFile = OutputFileName;
}