index ed5bcf3c7bd10f438b2a3b2fdde1e3471b955b88..a03da3c452a66467439e6a93d408a8594f794bc6 100644 (file)
cl::desc("Make an absence of debug location information explicit."),
cl::init(false));
-static cl::opt<bool> GenerateCUHash("generate-cu-hash", cl::Hidden,
- cl::desc("Add the CU hash as the dwo_id."),
- cl::init(true));
-
static cl::opt<bool>
GenerateGnuPubSections("generate-gnu-dwarf-pub-sections", cl::Hidden,
cl::desc("Generate GNU-style pubnames and pubtypes"),
// scope then create and insert DIEs for these variables.
DIE *DwarfDebug::updateSubprogramScopeDIE(DwarfCompileUnit *SPCU,
DISubprogram SP) {
+ SP = SPCU->getOdrUniqueSubprogram(resolve(SP.getContext()), SP);
DIE *SPDie = SPCU->getDIE(SP);
assert(SPDie && "Unable to find subprogram DIE!");
DwarfCompileUnit *SkCU =
static_cast<DwarfCompileUnit *>(TheU->getSkeleton());
if (useSplitDwarf()) {
- // This should be a unique identifier when we want to build .dwp files.
- uint64_t ID = 0;
- if (GenerateCUHash) {
- DIEHash CUHash(Asm);
- ID = CUHash.computeCUSignature(*TheU->getUnitDie());
- }
+ // Emit a unique identifier for this CU.
+ uint64_t ID = DIEHash(Asm).computeCUSignature(*TheU->getUnitDie());
TheU->addUInt(TheU->getUnitDie(), dwarf::DW_AT_GNU_dwo_id,
dwarf::DW_FORM_data8, ID);
SkCU->addUInt(SkCU->getUnitDie(), dwarf::DW_AT_GNU_dwo_id,
// Grab the lexical scopes for the function, if we don't have any of those
// then we're not going to be able to do anything.
LScopes.initialize(*MF);
- if (LScopes.empty())
+ if (LScopes.empty()) {
+ UsedNonDefaultText = true;
return;
+ }
assert(UserVariables.empty() && DbgValues.empty() && "Maps weren't cleaned");