mirror of
https://github.com/intel/llvm.git
synced 2026-02-09 01:52:26 +08:00
Move DeclSpec::setProtocolQualifiers() out of line.
llvm-svn: 83092
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user