aboutsummaryrefslogtreecommitdiff
path: root/CodeGen
diff options
context:
space:
mode:
authorNate Begeman <natebegeman@mac.com>2008-02-06 00:02:50 +0000
committerNate Begeman <natebegeman@mac.com>2008-02-06 00:02:50 +0000
commit4efe45919836728a2a38a50b8d79cd36432e1708 (patch)
treef09b2850e76c831f753532b1e77173eadf77aa6d /CodeGen
parent5e7dc44adec45c5c7dcd6b86172e59e9a1f10851 (diff)
simple implementation of __builtin_alloca
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46783 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'CodeGen')
-rw-r--r--CodeGen/CGBuiltin.cpp4
1 files changed, 4 insertions, 0 deletions
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);
}