forked from OSchip/llvm-project
DebugInfo: Omit pubnames/pubtypes when compiling with -gmlt
llvm-svn: 203634
This commit is contained in:
parent
bfaec9bf8b
commit
adbea1ef9f
|
@ -998,8 +998,9 @@ void DwarfUnit::updateAcceleratorTables(DIScope Context, DIType Ty,
|
|||
unsigned Flags = IsImplementation ? dwarf::DW_FLAG_type_implementation : 0;
|
||||
addAccelType(Ty.getName(), std::make_pair(TyDIE, Flags));
|
||||
|
||||
if (!Context || Context.isCompileUnit() || Context.isFile() ||
|
||||
Context.isNameSpace())
|
||||
if ((!Context || Context.isCompileUnit() || Context.isFile() ||
|
||||
Context.isNameSpace()) &&
|
||||
getCUNode().getEmissionKind() != DIBuilder::LineTablesOnly)
|
||||
GlobalTypes[getParentContextString(Context) + Ty.getName().str()] = TyDIE;
|
||||
}
|
||||
}
|
||||
|
@ -1064,6 +1065,8 @@ void DwarfUnit::addAccelType(StringRef Name,
|
|||
|
||||
/// addGlobalName - Add a new global name to the compile unit.
|
||||
void DwarfUnit::addGlobalName(StringRef Name, DIE *Die, DIScope Context) {
|
||||
if (getCUNode().getEmissionKind() == DIBuilder::LineTablesOnly)
|
||||
return;
|
||||
std::string FullName = getParentContextString(Context) + Name.str();
|
||||
GlobalNames[FullName] = Die;
|
||||
}
|
||||
|
|
|
@ -12,6 +12,12 @@
|
|||
; CHECK: .debug_ranges contents:
|
||||
; CHECK-NOT: 00000000 <End of list>
|
||||
|
||||
; CHECK: .debug_pubnames contents:
|
||||
; CHECK-NOT: Offset
|
||||
|
||||
; CHECK: .debug_pubtypes contents:
|
||||
; CHECK-NOT: Offset
|
||||
|
||||
; Function Attrs: nounwind uwtable
|
||||
define i32 @f(i32 %a) #0 {
|
||||
entry:
|
||||
|
|
Loading…
Reference in New Issue