aboutsummaryrefslogtreecommitdiff
path: root/lib/AST/Decl.cpp
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2011-10-06 05:00:56 +0000
committerTed Kremenek <kremenek@apple.com>2011-10-06 05:00:56 +0000
commitd211cb709510fbe7e75167b9feee0050851d001a (patch)
treef918f23438b79323e0126534ddc23b05dd8b6082 /lib/AST/Decl.cpp
parentf77c49681ab347f7602b21beda8be8b39386e0d2 (diff)
Use a sidetable in ASTContext for ParmVarDecls whose index exceeds the 8 bits reserved for that value in VarDecl. Fixes PR 10538.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141273 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/Decl.cpp')
-rw-r--r--lib/AST/Decl.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/AST/Decl.cpp b/lib/AST/Decl.cpp
index a4608eb81c..9870c8ea6b 100644
--- a/lib/AST/Decl.cpp
+++ b/lib/AST/Decl.cpp
@@ -1441,6 +1441,15 @@ bool ParmVarDecl::isParameterPack() const {
return isa<PackExpansionType>(getType());
}
+void ParmVarDecl::setParameterIndexLarge(unsigned parameterIndex) {
+ getASTContext().setParameterIndex(this, parameterIndex);
+ ParmVarDeclBits.ParameterIndex = ParameterIndexSentinel;
+}
+
+unsigned ParmVarDecl::getParameterIndexLarge() const {
+ return getASTContext().getParameterIndex(this);
+}
+
//===----------------------------------------------------------------------===//
// FunctionDecl Implementation
//===----------------------------------------------------------------------===//