ObjectiveC Generics: follow-up commit to r281355.

Correct getExtraLocalDataSize for ObjCTypeParamTypeLoc.

rdar://24619481
rdar://25060179

llvm-svn: 281404
This commit is contained in:
Manman Ren 2016-09-13 21:57:28 +00:00
parent c397f0b272
commit d33b4a6292
1 changed files with 3 additions and 1 deletions

View File

@ -763,7 +763,9 @@ public:
unsigned getExtraLocalDataSize() const {
if (!this->getNumProtocols()) return 0;
return this->getNumProtocols() * sizeof(SourceLocation) ;
// When there are protocol qualifers, we have LAngleLoc and RAngleLoc
// as well.
return (this->getNumProtocols() + 2) * sizeof(SourceLocation) ;
}
unsigned getExtraLocalDataAlignment() const {
return llvm::alignOf<SourceLocation>();