mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-19 18:24:00 +00:00
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:
@ -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()) {
|
||||
|
Reference in New Issue
Block a user