diff options
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2009-09-29 19:42:11 +0000 |
---|---|---|
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2009-09-29 19:42:11 +0000 |
commit | 5ec645b4945358feb67b379552bcfdcb89285ba6 (patch) | |
tree | 273c697ccb0ebd0a636db7a51aaafa351b2eca94 | |
parent | fc1f9e49458186e62e6c8f543d1ec2bb45361735 (diff) | |
download | bcm5719-llvm-5ec645b4945358feb67b379552bcfdcb89285ba6.tar.gz bcm5719-llvm-5ec645b4945358feb67b379552bcfdcb89285ba6.zip |
Move DeclSpec::setProtocolQualifiers() out of line.
llvm-svn: 83092
-rw-r--r-- | clang/include/clang/Parse/DeclSpec.h | 10 | ||||
-rw-r--r-- | clang/lib/Parse/DeclSpec.cpp | 13 |
2 files changed, 14 insertions, 9 deletions
diff --git a/clang/include/clang/Parse/DeclSpec.h b/clang/include/clang/Parse/DeclSpec.h index 7d316c43fd6..51970f1867d 100644 --- a/clang/include/clang/Parse/DeclSpec.h +++ b/clang/include/clang/Parse/DeclSpec.h @@ -350,15 +350,7 @@ public: SourceLocation getProtocolLAngleLoc() const { return ProtocolLAngleLoc; } void setProtocolQualifiers(const ActionBase::DeclPtrTy *Protos, unsigned NP, SourceLocation *ProtoLocs, - SourceLocation LAngleLoc) { - if (NP == 0) return; - ProtocolQualifiers = new ActionBase::DeclPtrTy[NP]; - ProtocolLocs = new SourceLocation[NP]; - memcpy((void*)ProtocolQualifiers, Protos, sizeof(ActionBase::DeclPtrTy)*NP); - memcpy(ProtocolLocs, ProtoLocs, sizeof(SourceLocation)*NP); - NumProtocolQualifiers = NP; - ProtocolLAngleLoc = LAngleLoc; - } + SourceLocation LAngleLoc); /// Finish - This does final analysis of the declspec, issuing diagnostics for /// things like "_Imaginary" (lacking an FP type). After calling this method, diff --git a/clang/lib/Parse/DeclSpec.cpp b/clang/lib/Parse/DeclSpec.cpp index 0342e393635..b8422aad5a8 100644 --- a/clang/lib/Parse/DeclSpec.cpp +++ b/clang/lib/Parse/DeclSpec.cpp @@ -334,6 +334,19 @@ bool DeclSpec::SetFriendSpec(SourceLocation Loc, const char *&PrevSpec, return false; } +void DeclSpec::setProtocolQualifiers(const ActionBase::DeclPtrTy *Protos, + unsigned NP, + SourceLocation *ProtoLocs, + SourceLocation LAngleLoc) { + if (NP == 0) return; + ProtocolQualifiers = new ActionBase::DeclPtrTy[NP]; + ProtocolLocs = new SourceLocation[NP]; + memcpy((void*)ProtocolQualifiers, Protos, sizeof(ActionBase::DeclPtrTy)*NP); + memcpy(ProtocolLocs, ProtoLocs, sizeof(SourceLocation)*NP); + NumProtocolQualifiers = NP; + ProtocolLAngleLoc = LAngleLoc; +} + /// Finish - This does final analysis of the declspec, rejecting things like /// "_Imaginary" (lacking an FP type). This returns a diagnostic to issue or /// diag::NUM_DIAGNOSTICS if there is no error. After calling this method, |