[llvm] r200229 - Silence MSVC warning on 'uint16_t |= bool' with a cast
Reid Kleckner
reid at kleckner.net
Mon Jan 27 09:47:12 PST 2014
Author: rnk
Date: Mon Jan 27 11:47:11 2014
New Revision: 200229
URL: http://llvm.org/viewvc/llvm-project?rev=200229&view=rev
Log:
Silence MSVC warning on 'uint16_t |= bool' with a cast
This isn't C4800, it's C4805. MSVC says this is unsafe, but it
generates correct code.
Modified:
llvm/trunk/include/llvm/CodeGen/SelectionDAGNodes.h
Modified: llvm/trunk/include/llvm/CodeGen/SelectionDAGNodes.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/SelectionDAGNodes.h?rev=200229&r1=200228&r2=200229&view=diff
==============================================================================
--- llvm/trunk/include/llvm/CodeGen/SelectionDAGNodes.h (original)
+++ llvm/trunk/include/llvm/CodeGen/SelectionDAGNodes.h Mon Jan 27 11:47:11 2014
@@ -1253,7 +1253,7 @@ class ConstantSDNode : public SDNode {
ConstantSDNode(bool isTarget, bool isOpaque, const ConstantInt *val, EVT VT)
: SDNode(isTarget ? ISD::TargetConstant : ISD::Constant,
0, DebugLoc(), getSDVTList(VT)), Value(val) {
- SubclassData |= isOpaque;
+ SubclassData |= (uint16_t)isOpaque;
}
public:
More information about the llvm-commits
mailing list