diff options
author | Eli Friedman <eli.friedman@gmail.com> | 2012-02-24 23:53:49 +0000 |
---|---|---|
committer | Eli Friedman <eli.friedman@gmail.com> | 2012-02-24 23:53:49 +0000 |
commit | cb3785e450ecf506d55dac3cca1abfee57b2c5d6 (patch) | |
tree | 05d45f2d891ad57e83edbe559fc2eb7e42504a10 /clang/lib/CodeGen/CGExprAgg.cpp | |
parent | 8d01935c099a03837461808e0d772fa5ac681a10 (diff) | |
download | bcm5719-llvm-cb3785e450ecf506d55dac3cca1abfee57b2c5d6.tar.gz bcm5719-llvm-cb3785e450ecf506d55dac3cca1abfee57b2c5d6.zip |
Fix a stupid mistake in r151133. Reported to me by Joerg Sonnenberger.
llvm-svn: 151407
Diffstat (limited to 'clang/lib/CodeGen/CGExprAgg.cpp')
-rw-r--r-- | clang/lib/CodeGen/CGExprAgg.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/clang/lib/CodeGen/CGExprAgg.cpp b/clang/lib/CodeGen/CGExprAgg.cpp index 6ea21ec47aa..d620d3b953a 100644 --- a/clang/lib/CodeGen/CGExprAgg.cpp +++ b/clang/lib/CodeGen/CGExprAgg.cpp @@ -857,10 +857,12 @@ void AggExprEmitter::EmitNullInitializationToLValue(LValue lv) { llvm::Value *null = llvm::Constant::getNullValue(CGF.ConvertType(type)); // Note that the following is not equivalent to // EmitStoreThroughBitfieldLValue for ARC types. - if (lv.isBitField()) + if (lv.isBitField()) { CGF.EmitStoreThroughBitfieldLValue(RValue::get(null), lv); - assert(lv.isSimple()); - CGF.EmitStoreOfScalar(null, lv, /* isInitialization */ true); + } else { + assert(lv.isSimple()); + CGF.EmitStoreOfScalar(null, lv, /* isInitialization */ true); + } } else { // There's a potential optimization opportunity in combining // memsets; that would be easy for arrays, but relatively |