SubstTemplateTypeParmType to be 'getIdentifier' instead of 'getName' as
it returns an identifier. This makes them more consistent with the
NamedDecl interface.
Also, switch back to using this interface to acquire the indentifier in
TypePrinter.cpp. I missed this in r130628.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130629
91177308-0d34-0410-b5e6-
96231b3b80d8
LLVM_CLANG_CANPROXY_SIMPLE_ACCESSOR(unsigned, getIndex)
LLVM_CLANG_CANPROXY_SIMPLE_ACCESSOR(bool, isParameterPack)
LLVM_CLANG_CANPROXY_SIMPLE_ACCESSOR(TemplateTypeParmDecl *, getDecl)
- LLVM_CLANG_CANPROXY_SIMPLE_ACCESSOR(IdentifierInfo *, getName)
+ LLVM_CLANG_CANPROXY_SIMPLE_ACCESSOR(IdentifierInfo *, getIdentifier)
};
template<>
return isCanonicalUnqualified() ? 0 : TTPDecl;
}
- IdentifierInfo *getName() const;
+ IdentifierInfo *getIdentifier() const;
bool isSugared() const { return false; }
QualType desugar() const { return QualType(this, 0); }
friend class ASTContext;
public:
- IdentifierInfo *getName() const { return Replaced->getName(); }
+ IdentifierInfo *getIdentifier() const { return Replaced->getIdentifier(); }
/// Gets the template parameter that was substituted for.
const TemplateTypeParmType *getReplacedParameter() const {
return isa<EnumDecl>(TT->getDecl());
}
-IdentifierInfo *TemplateTypeParmType::getName() const {
+IdentifierInfo *TemplateTypeParmType::getIdentifier() const {
return isCanonicalUnqualified() ? 0 : getDecl()->getIdentifier();
}
if (!S.empty()) // Prefix the basic type, e.g. 'parmname X'.
S = ' ' + S;
- if (IdentifierInfo *Id = T->getDecl() ? T->getDecl()->getIdentifier() : 0)
+ if (IdentifierInfo *Id = T->getIdentifier())
S = Id->getName().str() + S;
else
S = "type-parameter-" + llvm::utostr_32(T->getDepth()) + '-' +
IdentifierInfo *Name = 0;
if (const TemplateTypeParmType *TTP
= Unexpanded[I].first.dyn_cast<const TemplateTypeParmType *>())
- Name = TTP->getName();
+ Name = TTP->getIdentifier();
else
Name = Unexpanded[I].first.get<NamedDecl *>()->getIdentifier();
= Unexpanded[I].first.dyn_cast<const TemplateTypeParmType *>()) {
Depth = TTP->getDepth();
Index = TTP->getIndex();
- Name = TTP->getName();
+ Name = TTP->getIdentifier();
} else {
NamedDecl *ND = Unexpanded[I].first.get<NamedDecl *>();
if (isa<ParmVarDecl>(ND))