[cfe-commits] r53329 - /cfe/trunk/lib/CodeGen/CGBuiltin.cpp
Chris Lattner
sabre at nondot.org
Wed Jul 9 10:28:44 PDT 2008
Author: lattner
Date: Wed Jul 9 12:28:44 2008
New Revision: 53329
URL: http://llvm.org/viewvc/llvm-project?rev=53329&view=rev
Log:
Codegen support for __builtin_stdarg_start
Modified:
cfe/trunk/lib/CodeGen/CGBuiltin.cpp
Modified: cfe/trunk/lib/CodeGen/CGBuiltin.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGBuiltin.cpp?rev=53329&r1=53328&r2=53329&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGBuiltin.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGBuiltin.cpp Wed Jul 9 12:28:44 2008
@@ -57,6 +57,7 @@
return RValue::get(CGM.GetAddrOfConstantCFString(S));
}
+ case Builtin::BI__builtin_stdarg_start:
case Builtin::BI__builtin_va_start:
case Builtin::BI__builtin_va_end: {
Value *ArgValue = EmitScalarExpr(E->getArg(0));
@@ -66,8 +67,8 @@
ArgValue = Builder.CreateBitCast(ArgValue, DestType,
ArgValue->getNameStart());
- Intrinsic::ID inst = (BuiltinID == Builtin::BI__builtin_va_start) ?
- Intrinsic::vastart : Intrinsic::vaend;
+ Intrinsic::ID inst = (BuiltinID == Builtin::BI__builtin_va_end) ?
+ Intrinsic::vaend : Intrinsic::vastart;
return RValue::get(Builder.CreateCall(CGM.getIntrinsic(inst), ArgValue));
}
case Builtin::BI__builtin_va_copy: {
More information about the cfe-commits
mailing list