From 16f422ec862bb00aa88544d3b7bc69233272d622 Mon Sep 17 00:00:00 2001 From: Daniel Dunbar Date: Wed, 27 May 2009 23:45:33 +0000 Subject: Fix a use-of-undefined, IRgen expects the RValue for "void" to be a scalar RValue. llvm-svn: 72504 --- clang/lib/CodeGen/CGBuiltin.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'clang/lib/CodeGen') diff --git a/clang/lib/CodeGen/CGBuiltin.cpp b/clang/lib/CodeGen/CGBuiltin.cpp index a73be2c60e8..a90b30404bd 100644 --- a/clang/lib/CodeGen/CGBuiltin.cpp +++ b/clang/lib/CodeGen/CGBuiltin.cpp @@ -475,7 +475,7 @@ RValue CodeGenFunction::EmitBuiltinExpr(const FunctionDecl *FD, const llvm::Type *ElTy = cast(Ptr->getType())->getElementType(); Builder.CreateStore(llvm::Constant::getNullValue(ElTy), Ptr, true); - return RValue(); + return RValue::get(0); } case Builtin::BI__sync_synchronize: { @@ -483,7 +483,7 @@ RValue CodeGenFunction::EmitBuiltinExpr(const FunctionDecl *FD, C[0] = C[1] = C[2] = C[3] = llvm::ConstantInt::get(llvm::Type::Int1Ty, 1); C[4] = ConstantInt::get(llvm::Type::Int1Ty, 0); Builder.CreateCall(CGM.getIntrinsic(Intrinsic::memory_barrier), C, C + 5); - return RValue(); + return RValue::get(0); } // Library functions with special handling. -- cgit v1.2.3