Skip to content

Commit b0f0930

Browse files
SouraVXbryanpkc
authored andcommitted
[DebugInfo] Support of -gpubnames in Driver
1 parent 42561d0 commit b0f0930

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

clang/lib/Driver/ToolChains/ClassicFlang.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -356,6 +356,13 @@ void ClassicFlang::ConstructJob(Compilation &C, const JobAction &JA,
356356
CommonCmdArgs.push_back("0x1000000");
357357
else if (GDwarfArg->getOption().matches(options::OPT_gdwarf_5)) // -gdwarf-5
358358
CommonCmdArgs.push_back("0x2000000");
359+
// Handle `-gpubnames` option separately.
360+
for (auto Arg : Args.filtered(options::OPT_gpubnames)) {
361+
Arg->claim();
362+
CommonCmdArgs.push_back("-x");
363+
CommonCmdArgs.push_back("120");
364+
CommonCmdArgs.push_back("0x40000000"); // -gpubnames
365+
}
359366
}
360367

361368
// -Mipa has no effect

0 commit comments

Comments
 (0)