summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGBuiltin.cpp
diff options
context:
space:
mode:
authorEli Friedman <eli.friedman@gmail.com>2009-06-02 07:10:30 +0000
committerEli Friedman <eli.friedman@gmail.com>2009-06-02 07:10:30 +0000
commitf6bd15038c08725223158811fc9225abf9884157 (patch)
treee34dac3de1d16c1c6b907f6dc2d5f991c1e99628 /clang/lib/CodeGen/CGBuiltin.cpp
parentcb8302ee3e73fc099cf5b9f6e452283b63fdd690 (diff)
downloadbcm5719-llvm-f6bd15038c08725223158811fc9225abf9884157.tar.gz
bcm5719-llvm-f6bd15038c08725223158811fc9225abf9884157.zip
If we recognize alloca, treat it as a builtin. This fixes uses of
alloca without declaring it. llvm-svn: 72719
Diffstat (limited to 'clang/lib/CodeGen/CGBuiltin.cpp')
-rw-r--r--clang/lib/CodeGen/CGBuiltin.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/CGBuiltin.cpp b/clang/lib/CodeGen/CGBuiltin.cpp
index a90b30404bd..ec5738b28bd 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));
OpenPOWER on IntegriCloud