diff options
author | Ted Kremenek <kremenek@apple.com> | 2011-10-06 05:00:56 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2011-10-06 05:00:56 +0000 |
commit | d211cb709510fbe7e75167b9feee0050851d001a (patch) | |
tree | f918f23438b79323e0126534ddc23b05dd8b6082 /lib/AST/Decl.cpp | |
parent | f77c49681ab347f7602b21beda8be8b39386e0d2 (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.cpp | 9 |
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 //===----------------------------------------------------------------------===// |