If we recognize alloca, treat it as a builtin. This fixes uses of

alloca without declaring it.

llvm-svn: 72719
This commit is contained in:
Eli Friedman 2009-06-02 07:10:30 +00:00
parent cb8302ee3e
commit f6bd15038c
1 changed files with 1 additions and 0 deletions

View File

@ -268,6 +268,7 @@ RValue CodeGenFunction::EmitBuiltinExpr(const FunctionDecl *FD,
return RValue::get(Builder.CreateZExt(LHS, ConvertType(E->getType()),
"tmp"));
}
case Builtin::BIalloca:
case Builtin::BI__builtin_alloca: {
// FIXME: LLVM IR Should allow alloca with an i64 size!
Value *Size = EmitScalarExpr(E->getArg(0));