From f6bd15038c08725223158811fc9225abf9884157 Mon Sep 17 00:00:00 2001 From: Eli Friedman Date: Tue, 2 Jun 2009 07:10:30 +0000 Subject: [PATCH] If we recognize alloca, treat it as a builtin. This fixes uses of alloca without declaring it. llvm-svn: 72719 --- clang/lib/CodeGen/CGBuiltin.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/clang/lib/CodeGen/CGBuiltin.cpp b/clang/lib/CodeGen/CGBuiltin.cpp index a90b30404bdc..ec5738b28bd2 100644 --- a/clang/lib/CodeGen/CGBuiltin.cpp +++ b/clang/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));