diff options
author | Volodymyr Sapsai <vsapsai@apple.com> | 2019-10-11 21:21:02 +0000 |
---|---|---|
committer | Volodymyr Sapsai <vsapsai@apple.com> | 2019-10-11 21:21:02 +0000 |
commit | b95d4c3a99794f57b3ac7accd86f5c061f6c69f9 (patch) | |
tree | 1bd5b2145d3276b2dc64bcf4005ee42237bb9d0e /clang/lib/AST/ASTContext.cpp | |
parent | 49036dd3aef9265270dcf4bb645050510b68e183 (diff) | |
download | bcm5719-llvm-b95d4c3a99794f57b3ac7accd86f5c061f6c69f9.tar.gz bcm5719-llvm-b95d4c3a99794f57b3ac7accd86f5c061f6c69f9.zip |
[ObjC] Remove default parameter no caller was providing. NFC intended.
Currently there is no need to make ObjCTypeParamType have a canonical type
different from the one in corresponding ObjCTypeParamDecl. So remove the
corresponding unused API.
llvm-svn: 374596
Diffstat (limited to 'clang/lib/AST/ASTContext.cpp')
-rw-r--r-- | clang/lib/AST/ASTContext.cpp | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/clang/lib/AST/ASTContext.cpp b/clang/lib/AST/ASTContext.cpp index 8dd57f2bd28..cd6ea7f1f97 100644 --- a/clang/lib/AST/ASTContext.cpp +++ b/clang/lib/AST/ASTContext.cpp @@ -4714,8 +4714,7 @@ ASTContext::applyObjCProtocolQualifiers(QualType type, QualType ASTContext::getObjCTypeParamType(const ObjCTypeParamDecl *Decl, - ArrayRef<ObjCProtocolDecl *> protocols, - QualType Canonical) const { + ArrayRef<ObjCProtocolDecl *> protocols) const { // Look in the folding set for an existing type. llvm::FoldingSetNodeID ID; ObjCTypeParamType::Profile(ID, Decl, protocols); @@ -4724,16 +4723,14 @@ ASTContext::getObjCTypeParamType(const ObjCTypeParamDecl *Decl, ObjCTypeParamTypes.FindNodeOrInsertPos(ID, InsertPos)) return QualType(TypeParam, 0); - if (Canonical.isNull()) { - // We canonicalize to the underlying type. - Canonical = getCanonicalType(Decl->getUnderlyingType()); - if (!protocols.empty()) { - // Apply the protocol qualifers. - bool hasError; - Canonical = getCanonicalType(applyObjCProtocolQualifiers( - Canonical, protocols, hasError, true /*allowOnPointerType*/)); - assert(!hasError && "Error when apply protocol qualifier to bound type"); - } + // We canonicalize to the underlying type. + QualType Canonical = getCanonicalType(Decl->getUnderlyingType()); + if (!protocols.empty()) { + // Apply the protocol qualifers. + bool hasError; + Canonical = getCanonicalType(applyObjCProtocolQualifiers( + Canonical, protocols, hasError, true /*allowOnPointerType*/)); + assert(!hasError && "Error when apply protocol qualifier to bound type"); } unsigned size = sizeof(ObjCTypeParamType); |