[cfe-commits] r60321 - /cfe/trunk/lib/CodeGen/CGBuiltin.cpp
Anders Carlsson
andersca at mac.com
Sun Nov 30 18:31:41 PST 2008
Author: andersca
Date: Sun Nov 30 20:31:41 2008
New Revision: 60321
URL: http://llvm.org/viewvc/llvm-project?rev=60321&view=rev
Log:
Use the new Expr::Evaluate
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=60321&r1=60320&r2=60321&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGBuiltin.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGBuiltin.cpp Sun Nov 30 20:31:41 2008
@@ -38,12 +38,12 @@
RValue CodeGenFunction::EmitBuiltinExpr(unsigned BuiltinID, const CallExpr *E) {
// See if we can constant fold this builtin. If so, don't emit it at all.
- APValue Result;
+ Expr::EvalResult Result;
if (E->Evaluate(Result, CGM.getContext())) {
- if (Result.isInt())
- return RValue::get(llvm::ConstantInt::get(Result.getInt()));
- assert(Result.isFloat() && "Unsupported constant type");
- return RValue::get(llvm::ConstantFP::get(Result.getFloat()));
+ if (Result.Val.isInt())
+ return RValue::get(llvm::ConstantInt::get(Result.Val.getInt()));
+ assert(Result.Val.isFloat() && "Unsupported constant type");
+ return RValue::get(llvm::ConstantFP::get(Result.Val.getFloat()));
}
switch (BuiltinID) {
More information about the cfe-commits
mailing list