diff options
| author | Ken Dyck <kd@kendyck.com> | 2011-04-24 10:13:17 +0000 |
|---|---|---|
| committer | Ken Dyck <kd@kendyck.com> | 2011-04-24 10:13:17 +0000 |
| commit | b9e6b2c215d0a7930ad160b054bc86353da4a517 (patch) | |
| tree | de02bd6c113484d30a3c5576e9a251132a67495d /lib/CodeGen/CGExpr.cpp | |
| parent | c556ef293692cf4cb40e11e816656ac23e5567db (diff) | |
| download | clang-b9e6b2c215d0a7930ad160b054bc86353da4a517.tar.gz clang-b9e6b2c215d0a7930ad160b054bc86353da4a517.tar.bz2 clang-b9e6b2c215d0a7930ad160b054bc86353da4a517.tar.xz | |
Convert AccessInfo::AccessAlignment to CharUnits. No change in functionality
intended.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130087 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGExpr.cpp')
| -rw-r--r-- | lib/CodeGen/CGExpr.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/CodeGen/CGExpr.cpp b/lib/CodeGen/CGExpr.cpp index 892e9a3458..719403d668 100644 --- a/lib/CodeGen/CGExpr.cpp +++ b/lib/CodeGen/CGExpr.cpp @@ -740,8 +740,8 @@ RValue CodeGenFunction::EmitLoadOfBitfieldLValue(LValue LV, // Perform the load. llvm::LoadInst *Load = Builder.CreateLoad(Ptr, LV.isVolatileQualified()); - if (AI.AccessAlignment) - Load->setAlignment(AI.AccessAlignment); + if (!AI.AccessAlignment.isZero()) + Load->setAlignment(AI.AccessAlignment.getQuantity()); // Shift out unused low bits and mask out unused high bits. llvm::Value *Val = Load; @@ -964,8 +964,8 @@ void CodeGenFunction::EmitStoreThroughBitfieldLValue(RValue Src, LValue Dst, // If necessary, load and OR in bits that are outside of the bit-field. if (AI.TargetBitWidth != AI.AccessWidth) { llvm::LoadInst *Load = Builder.CreateLoad(Ptr, Dst.isVolatileQualified()); - if (AI.AccessAlignment) - Load->setAlignment(AI.AccessAlignment); + if (!AI.AccessAlignment.isZero()) + Load->setAlignment(AI.AccessAlignment.getQuantity()); // Compute the mask for zeroing the bits that are part of the bit-field. llvm::APInt InvMask = @@ -979,8 +979,8 @@ void CodeGenFunction::EmitStoreThroughBitfieldLValue(RValue Src, LValue Dst, // Write the value. llvm::StoreInst *Store = Builder.CreateStore(Val, Ptr, Dst.isVolatileQualified()); - if (AI.AccessAlignment) - Store->setAlignment(AI.AccessAlignment); + if (!AI.AccessAlignment.isZero()) + Store->setAlignment(AI.AccessAlignment.getQuantity()); } } |
