[cfe-commits] r126356 - /cfe/trunk/lib/AST/RecordLayoutBuilder.cpp
Ken Dyck
kd at kendyck.com
Wed Feb 23 17:33:05 PST 2011
Author: kjdyck
Date: Wed Feb 23 19:33:05 2011
New Revision: 126356
URL: http://llvm.org/viewvc/llvm-project?rev=126356&view=rev
Log:
Use Context.getCharWidth() in place of literal '8's in assertions.
Modified:
cfe/trunk/lib/AST/RecordLayoutBuilder.cpp
Modified: cfe/trunk/lib/AST/RecordLayoutBuilder.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/RecordLayoutBuilder.cpp?rev=126356&r1=126355&r2=126356&view=diff
==============================================================================
--- cfe/trunk/lib/AST/RecordLayoutBuilder.cpp (original)
+++ cfe/trunk/lib/AST/RecordLayoutBuilder.cpp Wed Feb 23 19:33:05 2011
@@ -699,7 +699,7 @@
DiagnosticBuilder Diag(SourceLocation Loc, unsigned DiagID);
CharUnits getSize() const {
- assert(Size % 8 == 0);
+ assert(Size % Context.getCharWidth() == 0);
return Context.toCharUnitsFromBits(Size);
}
uint64_t getSizeInBits() const { return Size; }
@@ -708,7 +708,7 @@
void setSize(uint64_t NewSize) { Size = NewSize; }
CharUnits getDataSize() const {
- assert(DataSize % 8 == 0);
+ assert(DataSize % Context.getCharWidth() == 0);
return Context.toCharUnitsFromBits(DataSize);
}
uint64_t getDataSizeInBits() const { return DataSize; }
More information about the cfe-commits
mailing list