summaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGExpr.cpp
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2010-08-21 02:39:23 +0000
committerDaniel Dunbar <daniel@zuster.org>2010-08-21 02:39:23 +0000
commit9f4f7cfe40edd5ed9d8ea7b8ce7c3dd988c7e310 (patch)
treea2f42d8a30adb5a9ec88a72e7f4c4054e172f718 /lib/CodeGen/CGExpr.cpp
parentde988818f4960cae954c6727cb1251142a03d750 (diff)
downloadclang-9f4f7cfe40edd5ed9d8ea7b8ce7c3dd988c7e310.tar.gz
clang-9f4f7cfe40edd5ed9d8ea7b8ce7c3dd988c7e310.tar.bz2
clang-9f4f7cfe40edd5ed9d8ea7b8ce7c3dd988c7e310.tar.xz
IRgen/CGValue: Add alignment to LValue, and use that alignment when generating lvalue load/stores.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111710 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGExpr.cpp')
-rw-r--r--lib/CodeGen/CGExpr.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/lib/CodeGen/CGExpr.cpp b/lib/CodeGen/CGExpr.cpp
index 1d686be19c..f0eec03755 100644
--- a/lib/CodeGen/CGExpr.cpp
+++ b/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,