DebugInfo: Include inline namespaces in template specialization parameter names
This ensures these types have distinct names if they are distinct types (eg: if one is an instantiation with a type in one inline namespace, and another from a type with the same simple name, but in a different inline namespace).
This commit is contained in:
parent
8294019633
commit
eb8a28e2cf
@ -305,6 +305,7 @@ StringRef CGDebugInfo::getClassName(const RecordDecl *RD) {
|
||||
llvm::raw_svector_ostream OS(Name);
|
||||
PrintingPolicy PP = getPrintingPolicy();
|
||||
PP.PrintCanonicalTypes = true;
|
||||
PP.SuppressInlineNamespace = false;
|
||||
RD->getNameForDiagnostic(OS, PP,
|
||||
/*Qualified*/ false);
|
||||
|
||||
|
@ -179,3 +179,11 @@ ClassTemplateArgRefTemplate<ClassTemplateArgObj.Arg> ClassTemplateArgRefObj;
|
||||
// CHECK: !DICompositeType(tag: DW_TAG_structure_type, name: "ClassTemplateArgRefTemplate<<template param ClassTemplateArg{1, 2.000000e+00}> >", {{.*}}, templateParams: ![[CLASS_TEMP_REF_ARGS:[0-9]*]],
|
||||
// CHECK: ![[CLASS_TEMP_REF_ARGS]] = !{![[CLASS_TEMP_REF_ARG:[0-9]*]]}
|
||||
// CHECK: ![[CLASS_TEMP_REF_ARG]] = !DITemplateValueParameter(type: ![[CLASS_TEMP_ARG_CONST_REF_TYPE]], value: %{{.*}}* @_ZTAXtl16ClassTemplateArgLi1ELf40000000EEE)
|
||||
|
||||
inline namespace inl {
|
||||
struct t1 { };
|
||||
}
|
||||
template<typename T> struct ClassTemplateInlineNamespaceArg {
|
||||
};
|
||||
ClassTemplateInlineNamespaceArg<inl::t1> ClassTemplateInlineNamespaceArgObj;
|
||||
// CHECK: !DICompositeType(tag: DW_TAG_structure_type, name: "ClassTemplateInlineNamespaceArg<inl::t1>",
|
||||
|
Loading…
x
Reference in New Issue
Block a user