diff options
author | grehan <grehan@FreeBSD.org> | 2011-06-28 06:26:03 +0000 |
---|---|---|
committer | grehan <grehan@FreeBSD.org> | 2011-06-28 06:26:03 +0000 |
commit | 2c6741be0f59191f2283eb268e4f7690399d578a (patch) | |
tree | b139c8c6dcca4fa284815daade405b75886ee360 /contrib/llvm/tools/clang/lib/CodeGen/CGExprConstant.cpp | |
parent | 3c35264f695e0a1f8a04dbcca1c93bb5159b2274 (diff) | |
parent | 19ae02bba572390c7299166228d31e54003e094a (diff) | |
download | FreeBSD-src-2c6741be0f59191f2283eb268e4f7690399d578a.zip FreeBSD-src-2c6741be0f59191f2283eb268e4f7690399d578a.tar.gz |
IFC @ r222830
Diffstat (limited to 'contrib/llvm/tools/clang/lib/CodeGen/CGExprConstant.cpp')
-rw-r--r-- | contrib/llvm/tools/clang/lib/CodeGen/CGExprConstant.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/contrib/llvm/tools/clang/lib/CodeGen/CGExprConstant.cpp b/contrib/llvm/tools/clang/lib/CodeGen/CGExprConstant.cpp index 463b913..da37bd5 100644 --- a/contrib/llvm/tools/clang/lib/CodeGen/CGExprConstant.cpp +++ b/contrib/llvm/tools/clang/lib/CodeGen/CGExprConstant.cpp @@ -352,8 +352,7 @@ bool ConstStructBuilder::Build(InitListExpr *ILE) { if (IsMsStruct) { // Zero-length bitfields following non-bitfield members are // ignored: - if (CGM.getContext().ZeroBitfieldFollowsNonBitfield((*Field), LastFD) || - CGM.getContext().ZeroBitfieldFollowsBitfield((*Field), LastFD)) { + if (CGM.getContext().ZeroBitfieldFollowsNonBitfield((*Field), LastFD)) { --FieldNo; continue; } @@ -611,12 +610,12 @@ public: return llvm::ConstantPointerNull::get(cast<llvm::PointerType>(destType)); case CK_IntegralCast: { - bool isSigned = subExpr->getType()->isSignedIntegerType(); + bool isSigned = subExpr->getType()->isSignedIntegerOrEnumerationType(); return llvm::ConstantExpr::getIntegerCast(C, destType, isSigned); } case CK_IntegralToPointer: { - bool isSigned = subExpr->getType()->isSignedIntegerType(); + bool isSigned = subExpr->getType()->isSignedIntegerOrEnumerationType(); C = llvm::ConstantExpr::getIntegerCast(C, CGM.IntPtrTy, isSigned); return llvm::ConstantExpr::getIntToPtr(C, destType); } @@ -626,13 +625,13 @@ public: llvm::Constant::getNullValue(C->getType())); case CK_IntegralToFloating: - if (subExpr->getType()->isSignedIntegerType()) + if (subExpr->getType()->isSignedIntegerOrEnumerationType()) return llvm::ConstantExpr::getSIToFP(C, destType); else return llvm::ConstantExpr::getUIToFP(C, destType); case CK_FloatingToIntegral: - if (E->getType()->isSignedIntegerType()) + if (E->getType()->isSignedIntegerOrEnumerationType()) return llvm::ConstantExpr::getFPToSI(C, destType); else return llvm::ConstantExpr::getFPToUI(C, destType); |