[cfe-commits] r46783 - /cfe/trunk/CodeGen/CGBuiltin.cpp

Nate Begeman natebegeman at mac.com
Tue Feb 5 16:02:51 PST 2008


Author: sampo
Date: Tue Feb  5 18:02:50 2008
New Revision: 46783

URL: http://llvm.org/viewvc/llvm-project?rev=46783&view=rev
Log:
simple implementation of __builtin_alloca

Modified:
    cfe/trunk/CodeGen/CGBuiltin.cpp

Modified: cfe/trunk/CodeGen/CGBuiltin.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/CodeGen/CGBuiltin.cpp?rev=46783&r1=46782&r2=46783&view=diff

==============================================================================
--- cfe/trunk/CodeGen/CGBuiltin.cpp (original)
+++ cfe/trunk/CodeGen/CGBuiltin.cpp Tue Feb  5 18:02:50 2008
@@ -205,6 +205,10 @@
     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);
 }





More information about the cfe-commits mailing list