aboutsummaryrefslogtreecommitdiff
path: root/lib/AST/MangleNumberingContext.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/AST/MangleNumberingContext.cpp')
-rw-r--r--lib/AST/MangleNumberingContext.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/AST/MangleNumberingContext.cpp b/lib/AST/MangleNumberingContext.cpp
index 91ef0e2240d8..5f40f0347d0e 100644
--- a/lib/AST/MangleNumberingContext.cpp
+++ b/lib/AST/MangleNumberingContext.cpp
@@ -24,7 +24,7 @@ MangleNumberingContext::getManglingNumber(const CXXMethodDecl *CallOperator) {
= CallOperator->getType()->getAs<FunctionProtoType>();
ASTContext &Context = CallOperator->getASTContext();
- QualType Key = Context.getFunctionType(Context.VoidTy, Proto->getArgTypes(),
+ QualType Key = Context.getFunctionType(Context.VoidTy, Proto->getParamTypes(),
FunctionProtoType::ExtProtoInfo());
Key = Context.getCanonicalType(Key);
return ++ManglingNumbers[Key->castAs<FunctionProtoType>()];
@@ -33,11 +33,13 @@ MangleNumberingContext::getManglingNumber(const CXXMethodDecl *CallOperator) {
unsigned
MangleNumberingContext::getManglingNumber(const BlockDecl *BD) {
// FIXME: Compute a BlockPointerType? Not obvious how.
- const Type *Ty = 0;
+ const Type *Ty = nullptr;
return ++ManglingNumbers[Ty];
}
unsigned
-MangleNumberingContext::getManglingNumber(const TagDecl *TD) {
- return ++TagManglingNumbers[TD->getIdentifier()];
+MangleNumberingContext::getStaticLocalNumber(const VarDecl *VD) {
+ // FIXME: Compute a BlockPointerType? Not obvious how.
+ const Type *Ty = nullptr;
+ return ++ManglingNumbers[Ty];
}