[llvm] r284713 - Fix MSVC bool -> uint64_t promotion warning

Simon Pilgrim via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 20 03:37:58 PDT 2016


Author: rksimon
Date: Thu Oct 20 05:37:58 2016
New Revision: 284713

URL: http://llvm.org/viewvc/llvm-project?rev=284713&view=rev
Log:
Fix MSVC bool -> uint64_t promotion warning

Modified:
    llvm/trunk/lib/Bitcode/Writer/BitcodeWriter.cpp

Modified: llvm/trunk/lib/Bitcode/Writer/BitcodeWriter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Bitcode/Writer/BitcodeWriter.cpp?rev=284713&r1=284712&r2=284713&view=diff
==============================================================================
--- llvm/trunk/lib/Bitcode/Writer/BitcodeWriter.cpp (original)
+++ llvm/trunk/lib/Bitcode/Writer/BitcodeWriter.cpp Thu Oct 20 05:37:58 2016
@@ -1735,7 +1735,7 @@ void ModuleBitcodeWriter::writeDILocalVa
   // 4) Record has neither artificial tag, nor inlignedAt field, but
   //   HasAlignment flag is true and Record[8] contains alignment value.
   const uint64_t HasAlignmentFlag = 1 << 1;
-  Record.push_back(N->isDistinct() | HasAlignmentFlag);
+  Record.push_back((uint64_t)N->isDistinct() | HasAlignmentFlag);
   Record.push_back(VE.getMetadataOrNullID(N->getScope()));
   Record.push_back(VE.getMetadataOrNullID(N->getRawName()));
   Record.push_back(VE.getMetadataOrNullID(N->getFile()));




More information about the llvm-commits mailing list