fix off-by-one error.

llvm-svn: 44963
This commit is contained in:
Chris Lattner 2007-12-12 23:46:36 +00:00
parent 8fdd3d95eb
commit b8bd2db8b3
1 changed files with 1 additions and 1 deletions

View File

@ -519,7 +519,7 @@ void CodeGenModule::EmitGlobalVarDeclarator(const FileVarDecl *D) {
/// getBuiltinLibFunction
llvm::Function *CodeGenModule::getBuiltinLibFunction(unsigned BuiltinID) {
if (BuiltinFunctions.size() <= BuiltinID)
BuiltinFunctions.resize(BuiltinID);
BuiltinFunctions.resize(BuiltinID+1);
// Already available?
llvm::Function *&FunctionSlot = BuiltinFunctions[BuiltinID];