diff options
| author | Daniel Dunbar <daniel@zuster.org> | 2009-05-27 23:45:33 +0000 |
|---|---|---|
| committer | Daniel Dunbar <daniel@zuster.org> | 2009-05-27 23:45:33 +0000 |
| commit | 16f422ec862bb00aa88544d3b7bc69233272d622 (patch) | |
| tree | 3c32cf0a1370f797a13eb15536492c83e4dc34e5 /clang | |
| parent | 14f5c132c1af5f8b082590b24ce1dcc1fffb9e81 (diff) | |
| download | bcm5719-llvm-16f422ec862bb00aa88544d3b7bc69233272d622.tar.gz bcm5719-llvm-16f422ec862bb00aa88544d3b7bc69233272d622.zip | |
Fix a use-of-undefined, IRgen expects the RValue for "void" to be a scalar RValue.
llvm-svn: 72504
Diffstat (limited to 'clang')
| -rw-r--r-- | clang/lib/CodeGen/CGBuiltin.cpp | 4 | ||||
| -rw-r--r-- | clang/test/CodeGen/atomic.c | 2 |
2 files changed, 3 insertions, 3 deletions
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<llvm::PointerType>(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. diff --git a/clang/test/CodeGen/atomic.c b/clang/test/CodeGen/atomic.c index 09e3bf03a47..66dc702bfee 100644 --- a/clang/test/CodeGen/atomic.c +++ b/clang/test/CodeGen/atomic.c @@ -14,7 +14,7 @@ int atomic(void) { - // nonsenical test for sync functions + // non-sensical test for sync functions int old; int val = 1; char valc = 1; |

