mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-19 18:24:00 +00:00
Record the DWARF version in MCContext
Record the DWARF version in MCContext, and use it when emitting the dwarf version into the debug info. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207739 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -154,6 +154,9 @@ static cl::opt<bool>
|
||||
GenDwarfForAssembly("g", cl::desc("Generate dwarf debugging info for assembly "
|
||||
"source files"));
|
||||
|
||||
static cl::opt<int>
|
||||
DwarfVersion("dwarf-version", cl::desc("Dwarf version"), cl::init(4));
|
||||
|
||||
static cl::opt<std::string>
|
||||
DebugCompilationDir("fdebug-compilation-dir",
|
||||
cl::desc("Specifies the debug info's compilation dir"));
|
||||
@ -406,6 +409,12 @@ int main(int argc, char **argv) {
|
||||
Ctx.setAllowTemporaryLabels(false);
|
||||
|
||||
Ctx.setGenDwarfForAssembly(GenDwarfForAssembly);
|
||||
if (DwarfVersion < 2 || DwarfVersion > 4) {
|
||||
errs() << ProgName << ": Dwarf version " << DwarfVersion
|
||||
<< " is not supported." << '\n';
|
||||
return 1;
|
||||
}
|
||||
Ctx.setDwarfVersion(DwarfVersion);
|
||||
if (!DwarfDebugFlags.empty())
|
||||
Ctx.setDwarfDebugFlags(StringRef(DwarfDebugFlags));
|
||||
if (!DwarfDebugProducer.empty())
|
||||
|
Reference in New Issue
Block a user