diff --git a/clang/lib/CodeGen/CGDebugInfo.cpp b/clang/lib/CodeGen/CGDebugInfo.cpp index 8887c4de7c4c8..609957b75d6e7 100644 --- a/clang/lib/CodeGen/CGDebugInfo.cpp +++ b/clang/lib/CodeGen/CGDebugInfo.cpp @@ -1472,15 +1472,6 @@ llvm::DIType *CGDebugInfo::CreateType(const TemplateSpecializationType *Ty, return AliasTy; } - // Disable PrintCanonicalTypes here because we want - // the DW_AT_name to benefit from the TypePrinter's ability - // to skip defaulted template arguments. - // - // FIXME: Once -gsimple-template-names is enabled by default - // and we attach template parameters to alias template DIEs - // we don't need to worry about customizing the PrintingPolicy - // here anymore. - PP.PrintCanonicalTypes = false; printTemplateArgumentList(OS, Ty->template_arguments(), PP, TD->getTemplateParameters()); return DBuilder.createTypedef(Src, OS.str(), getOrCreateFile(Loc), diff --git a/clang/test/CodeGenCXX/debug-info-alias.cpp b/clang/test/CodeGenCXX/debug-info-alias.cpp index bf2dbee465959..fbb2ad6e5ff08 100644 --- a/clang/test/CodeGenCXX/debug-info-alias.cpp +++ b/clang/test/CodeGenCXX/debug-info-alias.cpp @@ -24,7 +24,7 @@ x::bar bi; // CHECK: [[BFLOAT]] = !DIDerivedType(tag: DW_TAG_typedef, name: "bar" x::bar bf; // CHECK: !DIGlobalVariable(name: "bz",{{.*}} type: [[BBAZ:![0-9]+]] -// CHECK: [[BBAZ]] = !DIDerivedType(tag: DW_TAG_typedef, name: "bar >" +// CHECK: [[BBAZ]] = !DIDerivedType(tag: DW_TAG_typedef, name: "bar >" x::bar> bz; using