From 4efe45919836728a2a38a50b8d79cd36432e1708 Mon Sep 17 00:00:00 2001 From: Nate Begeman Date: Wed, 6 Feb 2008 00:02:50 +0000 Subject: [PATCH] simple implementation of __builtin_alloca git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46783 91177308-0d34-0410-b5e6-96231b3b80d8 --- CodeGen/CGBuiltin.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CodeGen/CGBuiltin.cpp b/CodeGen/CGBuiltin.cpp index f3eef1f4ae..996978e138 100644 --- a/CodeGen/CGBuiltin.cpp +++ b/CodeGen/CGBuiltin.cpp @@ -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); } -- 2.50.1