diff options
author | Daniel Dunbar <daniel@zuster.org> | 2008-08-13 23:47:13 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2008-08-13 23:47:13 +0000 |
commit | 32442bbc98bafa512fa42d46fedf60ed7d79f574 (patch) | |
tree | 52d208f90cc5ef783f847b7b91300759a6cd62c6 /lib/CodeGen/CodeGenTypes.cpp | |
parent | 3998d3fb8e34d3122cb815f1c18a4a246695215f (diff) |
Update some isIntegerConstantExpr uses to use
getIntegerConstantExprValue where appropriate.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54771 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CodeGenTypes.cpp')
-rw-r--r-- | lib/CodeGen/CodeGenTypes.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/lib/CodeGen/CodeGenTypes.cpp b/lib/CodeGen/CodeGenTypes.cpp index 2d5bd12f92..5b291d4616 100644 --- a/lib/CodeGen/CodeGenTypes.cpp +++ b/lib/CodeGen/CodeGenTypes.cpp @@ -553,11 +553,8 @@ void RecordOrganizer::layoutUnionFields(const ASTRecordLayout &RL) { if (FD->isBitField()) { Expr *BitWidth = FD->getBitWidth(); - llvm::APSInt FieldSize(32); - bool isBitField = - BitWidth->isIntegerConstantExpr(FieldSize, CGT.getContext()); - assert (isBitField && "Invalid BitField size expression"); - uint64_t BitFieldSize = FieldSize.getZExtValue(); + uint64_t BitFieldSize = + BitWidth->getIntegerConstantExprValue(CGT.getContext()).getZExtValue(); CGT.addFieldInfo(FD, 0); CGT.addBitFieldInfo(FD, offset, BitFieldSize); |