diff options
author | Serge Pavlov <sepavloff@gmail.com> | 2017-11-28 16:14:14 +0000 |
---|---|---|
committer | Serge Pavlov <sepavloff@gmail.com> | 2017-11-28 16:14:14 +0000 |
commit | 03e672ccab0eeb4ec685c6f6b3950cd177fadf1f (patch) | |
tree | dbb658165bb423799c82da410fd2c3ce71a252b9 /clang/lib/CodeGen/CGDebugInfo.cpp | |
parent | 14bd3b9f213918f9d717f297496bfc5d3707bc3b (diff) | |
download | bcm5719-llvm-03e672ccab0eeb4ec685c6f6b3950cd177fadf1f.tar.gz bcm5719-llvm-03e672ccab0eeb4ec685c6f6b3950cd177fadf1f.zip |
Refactor functions PrintTemplateArgumentList
These functions were defined as static members of TemplateSpecializationType.
Now they are moved to namespace level. Previously there were different
implementations for lists containing TemplateArgument and TemplateArgumentLoc,
now these implementations share the same code.
This change is a result of refactoring patch D40508. NFC.
llvm-svn: 319178
Diffstat (limited to 'clang/lib/CodeGen/CGDebugInfo.cpp')
-rw-r--r-- | clang/lib/CodeGen/CGDebugInfo.cpp | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/clang/lib/CodeGen/CGDebugInfo.cpp b/clang/lib/CodeGen/CGDebugInfo.cpp index 3e4acd208f6..5a288abe365 100644 --- a/clang/lib/CodeGen/CGDebugInfo.cpp +++ b/clang/lib/CodeGen/CGDebugInfo.cpp @@ -265,8 +265,7 @@ StringRef CGDebugInfo::getFunctionName(const FunctionDecl *FD) { // Add any template specialization args. if (Info) { const TemplateArgumentList *TArgs = Info->TemplateArguments; - TemplateSpecializationType::PrintTemplateArgumentList(OS, TArgs->asArray(), - getPrintingPolicy()); + printTemplateArgumentList(OS, TArgs->asArray(), getPrintingPolicy()); } // Copy this name on the side and use its reference. @@ -941,11 +940,8 @@ llvm::DIType *CGDebugInfo::CreateType(const TemplateSpecializationType *Ty, SmallString<128> NS; llvm::raw_svector_ostream OS(NS); - Ty->getTemplateName().print(OS, getPrintingPolicy(), - /*qualified*/ false); - - TemplateSpecializationType::PrintTemplateArgumentList( - OS, Ty->template_arguments(), getPrintingPolicy()); + Ty->getTemplateName().print(OS, getPrintingPolicy(), /*qualified*/ false); + printTemplateArgumentList(OS, Ty->template_arguments(), getPrintingPolicy()); auto *AliasDecl = cast<TypeAliasTemplateDecl>( Ty->getTemplateName().getAsTemplateDecl())->getTemplatedDecl(); |