simple implementation of __builtin_alloca

llvm-svn: 46783
This commit is contained in:
Nate Begeman 2008-02-06 00:02:50 +00:00
parent 2352150043
commit 3399bb424c
1 changed files with 4 additions and 0 deletions

View File

@ -205,6 +205,10 @@ RValue CodeGenFunction::EmitBuiltinExpr(unsigned BuiltinID, const CallExpr *E) {
return RValue::get(Builder.CreateZExt(LHS, ConvertType(E->getType()),
"tmp"));
}
case Builtin::BI__builtin_alloca:
return RValue::get(Builder.CreateAlloca(llvm::Type::Int8Ty,
EmitScalarExpr(E->getArg(0)),
"tmp"));
}
return RValue::get(0);
}