diff options
| author | Eli Friedman <eli.friedman@gmail.com> | 2011-12-03 04:14:32 +0000 |
|---|---|---|
| committer | Eli Friedman <eli.friedman@gmail.com> | 2011-12-03 04:14:32 +0000 |
| commit | 6da2c716017d5c8530ec99779524491ebc5dadb8 (patch) | |
| tree | a18c0d51c83e68abf22cff9ce45ec00e51191594 /lib/CodeGen/CodeGenFunction.h | |
| parent | 8bc27822fc867d43399d4474bccbb58b7b7c7ad7 (diff) | |
| download | clang-6da2c716017d5c8530ec99779524491ebc5dadb8.tar.gz clang-6da2c716017d5c8530ec99779524491ebc5dadb8.tar.bz2 clang-6da2c716017d5c8530ec99779524491ebc5dadb8.tar.xz | |
Switch LValue so that it exposes alignment in CharUnits. (No functional change.)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145753 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CodeGenFunction.h')
| -rw-r--r-- | lib/CodeGen/CodeGenFunction.h | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/lib/CodeGen/CodeGenFunction.h b/lib/CodeGen/CodeGenFunction.h index 74f48c3d80..d611996bd1 100644 --- a/lib/CodeGen/CodeGenFunction.h +++ b/lib/CodeGen/CodeGenFunction.h @@ -1537,16 +1537,15 @@ public: // Helpers //===--------------------------------------------------------------------===// - LValue MakeAddrLValue(llvm::Value *V, QualType T, unsigned Alignment = 0) { + LValue MakeAddrLValue(llvm::Value *V, QualType T, + CharUnits Alignment = CharUnits()) { return LValue::MakeAddr(V, T, Alignment, getContext(), CGM.getTBAAInfo(T)); } LValue MakeNaturalAlignAddrLValue(llvm::Value *V, QualType T) { - unsigned Alignment; - if (T->isIncompleteType()) - Alignment = 0; - else - Alignment = getContext().getTypeAlignInChars(T).getQuantity(); + CharUnits Alignment; + if (!T->isIncompleteType()) + Alignment = getContext().getTypeAlignInChars(T); return LValue::MakeAddr(V, T, Alignment, getContext(), CGM.getTBAAInfo(T)); } |
