Silence MSVC warning on 'uint16_t |= bool' with a cast
authorReid Kleckner <reid@kleckner.net>
Mon, 27 Jan 2014 17:47:11 +0000 (17:47 +0000)
committerReid Kleckner <reid@kleckner.net>
Mon, 27 Jan 2014 17:47:11 +0000 (17:47 +0000)
This isn't C4800, it's C4805.  MSVC says this is unsafe, but it
generates correct code.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200229 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/CodeGen/SelectionDAGNodes.h

index 976d212ce3d16d73db508b60c256bc221bcea5a4..216d40c18f255513dbfc131ccdbc33f36428251d 100644 (file)
@@ -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: