From: Eli Friedman Date: Tue, 2 Jun 2009 07:10:30 +0000 (+0000) Subject: If we recognize alloca, treat it as a builtin. This fixes uses of X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b52fe9ce99970955a5f581f5c66fcd89be9a268b;p=clang If we recognize alloca, treat it as a builtin. This fixes uses of alloca without declaring it. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72719 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/CGBuiltin.cpp b/lib/CodeGen/CGBuiltin.cpp index a90b30404b..ec5738b28b 100644 --- a/lib/CodeGen/CGBuiltin.cpp +++ b/lib/CodeGen/CGBuiltin.cpp @@ -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));