diff options
author | Daniel Dunbar <daniel@zuster.org> | 2010-08-21 02:39:23 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2010-08-21 02:39:23 +0000 |
commit | e3b8dd433cf0dd2a9e380a4351d0286302801e14 (patch) | |
tree | 6101323d8540ac05b7de5a2d34b3d2eb80a5aefc /clang/lib/CodeGen/CGExpr.cpp | |
parent | 42ef669d815fd9745cbd0c06e573052647cd16b3 (diff) | |
download | bcm5719-llvm-e3b8dd433cf0dd2a9e380a4351d0286302801e14.tar.gz bcm5719-llvm-e3b8dd433cf0dd2a9e380a4351d0286302801e14.zip |
IRgen/CGValue: Add alignment to LValue, and use that alignment when generating lvalue load/stores.
llvm-svn: 111710
Diffstat (limited to 'clang/lib/CodeGen/CGExpr.cpp')
-rw-r--r-- | clang/lib/CodeGen/CGExpr.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/clang/lib/CodeGen/CGExpr.cpp b/clang/lib/CodeGen/CGExpr.cpp index 1d686be19c4..f0eec037557 100644 --- a/clang/lib/CodeGen/CGExpr.cpp +++ b/clang/lib/CodeGen/CGExpr.cpp @@ -635,11 +635,9 @@ RValue CodeGenFunction::EmitLoadOfLValue(LValue LV, QualType ExprType) { // Simple scalar l-value. // // FIXME: We shouldn't have to use isSingleValueType here. - // - // FIXME: Pass alignment! if (EltTy->isSingleValueType()) return RValue::get(EmitLoadOfScalar(Ptr, LV.isVolatileQualified(), - /*Alignment=*/0, ExprType)); + LV.getAlignment(), ExprType)); assert(ExprType->isFunctionType() && "Unknown scalar value"); return RValue::get(Ptr); @@ -849,9 +847,8 @@ void CodeGenFunction::EmitStoreThroughLValue(RValue Src, LValue Dst, } assert(Src.isScalar() && "Can't emit an agg store with this method"); - // FIXME: Pass alignment. EmitStoreOfScalar(Src.getScalarVal(), Dst.getAddress(), - Dst.isVolatileQualified(), /*Alignment=*/0, Ty); + Dst.isVolatileQualified(), Dst.getAlignment(), Ty); } void CodeGenFunction::EmitStoreThroughBitfieldLValue(RValue Src, LValue Dst, |