Sema: Give a typically small DenseMap some inline capacity.

Also reflow code a bit, no change in functionality.

llvm-svn: 179382
This commit is contained in:
Benjamin Kramer
2013-04-12 15:22:25 +00:00
parent f9cea17f75
commit 1b4342dbda
2 changed files with 7 additions and 8 deletions

View File

@@ -2701,11 +2701,10 @@ void LocalInstantiationScope::InstantiatedLocal(const Decl *D, Decl *Inst) {
llvm::PointerUnion<Decl *, DeclArgumentPack *> &Stored = LocalDecls[D];
if (Stored.isNull())
Stored = Inst;
else if (Stored.is<Decl *>()) {
else if (DeclArgumentPack *Pack = Stored.dyn_cast<DeclArgumentPack *>())
Pack->push_back(Inst);
else
assert(Stored.get<Decl *>() == Inst && "Already instantiated this local");
Stored = Inst;
} else
LocalDecls[D].get<DeclArgumentPack *>()->push_back(Inst);
}
void LocalInstantiationScope::InstantiatedLocalPackArg(const Decl *D,