diff options
author | Eli Friedman <eli.friedman@gmail.com> | 2011-12-03 02:13:40 +0000 |
---|---|---|
committer | Eli Friedman <eli.friedman@gmail.com> | 2011-12-03 02:13:40 +0000 |
commit | 38cd36dbdb8c7ee8faccc9c9ac8d57d185553fde (patch) | |
tree | 2c0f9c7e739718bdcf80b10fa03936f53afb0d19 /clang/lib/CodeGen/CGValue.h | |
parent | 25f66700038aecf35396c15ee6bdedc98ea04e8f (diff) | |
download | bcm5719-llvm-38cd36dbdb8c7ee8faccc9c9ac8d57d185553fde.tar.gz bcm5719-llvm-38cd36dbdb8c7ee8faccc9c9ac8d57d185553fde.zip |
Switch the Alignment argument on AggValueSlot over to CharUnits, per John's review comment.
llvm-svn: 145741
Diffstat (limited to 'clang/lib/CodeGen/CGValue.h')
-rw-r--r-- | clang/lib/CodeGen/CGValue.h | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/clang/lib/CodeGen/CGValue.h b/clang/lib/CodeGen/CGValue.h index e507e718660..c83000bb978 100644 --- a/clang/lib/CodeGen/CGValue.h +++ b/clang/lib/CodeGen/CGValue.h @@ -16,6 +16,7 @@ #define CLANG_CODEGEN_CGVALUE_H #include "clang/AST/ASTContext.h" +#include "clang/AST/CharUnits.h" #include "clang/AST/Type.h" namespace llvm { @@ -366,7 +367,7 @@ public: /// for calling destructors on this object /// \param needsGC - true if the slot is potentially located /// somewhere that ObjC GC calls should be emitted for - static AggValueSlot forAddr(llvm::Value *addr, unsigned align, + static AggValueSlot forAddr(llvm::Value *addr, CharUnits align, Qualifiers quals, IsDestructed_t isDestructed, NeedsGCBarriers_t needsGC, @@ -374,7 +375,7 @@ public: IsZeroed_t isZeroed = IsNotZeroed) { AggValueSlot AV; AV.Addr = addr; - AV.Alignment = align; + AV.Alignment = align.getQuantity(); AV.Quals = quals; AV.DestructedFlag = isDestructed; AV.ObjCGCFlag = needsGC; @@ -387,8 +388,8 @@ public: NeedsGCBarriers_t needsGC, IsAliased_t isAliased, IsZeroed_t isZeroed = IsNotZeroed) { - return forAddr(LV.getAddress(), LV.getAlignment(), LV.getQuals(), - isDestructed, needsGC, isAliased, isZeroed); + return forAddr(LV.getAddress(), CharUnits::fromQuantity(LV.getAlignment()), + LV.getQuals(), isDestructed, needsGC, isAliased, isZeroed); } IsDestructed_t isExternallyDestructed() const { @@ -420,8 +421,8 @@ public: return Addr == 0; } - unsigned getAlignment() const { - return Alignment; + CharUnits getAlignment() const { + return CharUnits::fromQuantity(Alignment); } IsAliased_t isPotentiallyAliased() const { |