First part of support for generating dwarf for assembly source files with the

-g flag.  In this part we generate the .file for the source being assembled and
the .loc's for the assembled instructions.

The next part will be to generate the dwarf Compile Unit DIE and a dwarf
subprogram DIE for each non-temporary label.

Once the next part is done test cases will be added.  rdar://9275556


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143509 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Kevin Enderby
2011-11-01 22:27:22 +00:00
parent 60cb643f75
commit 613b757689
4 changed files with 50 additions and 0 deletions

View File

@ -152,6 +152,10 @@ NoInitialTextSection("n", cl::desc("Don't assume assembly file starts "
static cl::opt<bool>
SaveTempLabels("L", cl::desc("Don't discard temporary labels"));
static cl::opt<bool>
GenDwarfForAssembly("g", cl::desc("Generate dwarf debugging info for assembly "
"source files"));
enum ActionType {
AC_AsLex,
AC_Assemble,
@ -377,6 +381,8 @@ static int AssembleInput(const char *ProgName) {
if (SaveTempLabels)
Ctx.setAllowTemporaryLabels(false);
Ctx.setGenDwarfForAssembly(GenDwarfForAssembly);
// Package up features to be passed to target/subtarget
std::string FeaturesStr;
if (MAttrs.size()) {