]> granicus.if.org Git - clang/commitdiff
If we recognize alloca, treat it as a builtin. This fixes uses of
authorEli Friedman <eli.friedman@gmail.com>
Tue, 2 Jun 2009 07:10:30 +0000 (07:10 +0000)
committerEli Friedman <eli.friedman@gmail.com>
Tue, 2 Jun 2009 07:10:30 +0000 (07:10 +0000)
alloca without declaring it.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72719 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/CGBuiltin.cpp

index a90b30404bdc91c731dcad74147e93bcfe755939..ec5738b28bd2e4355f64f5c2ddbed283c0dbbde9 100644 (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));