assert(GV.isGlobalVariable());
- DIScope GVContext = GV.getContext();
+ DIScope GVContext = DD->resolve(GV.getContext());
DIType GTy = DD->resolve(GV.getType());
// Construct the context before querying for the existence of the DIE in
DIE *VariableSpecDIE = getOrCreateStaticMemberDIE(SDMDecl);
addDIEEntry(*VariableDIE, dwarf::DW_AT_specification, *VariableSpecDIE);
} else {
- DeclContext = GV.getContext();
+ DeclContext = resolve(GV.getContext());
// Add name and type.
addString(*VariableDIE, dwarf::DW_AT_name, GV.getDisplayName());
addType(*VariableDIE, GTy);