[llvm] r288796 - Fix MSVC bool to uint64_t promotion warning

Simon Pilgrim via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 6 03:12:53 PST 2016


Author: rksimon
Date: Tue Dec  6 05:12:53 2016
New Revision: 288796

URL: http://llvm.org/viewvc/llvm-project?rev=288796&view=rev
Log:
Fix MSVC bool to 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=288796&r1=288795&r2=288796&view=diff
==============================================================================
--- llvm/trunk/lib/Bitcode/Writer/BitcodeWriter.cpp (original)
+++ llvm/trunk/lib/Bitcode/Writer/BitcodeWriter.cpp Tue Dec  6 05:12:53 2016
@@ -1728,7 +1728,7 @@ void ModuleBitcodeWriter::writeDIExpress
   Record.reserve(N->getElements().size() + 1);
 
   const uint64_t HasOpFragmentFlag = 1 << 1;
-  Record.push_back(N->isDistinct() | HasOpFragmentFlag);
+  Record.push_back((uint64_t)N->isDistinct() | HasOpFragmentFlag);
   Record.append(N->elements_begin(), N->elements_end());
 
   Stream.EmitRecord(bitc::METADATA_EXPRESSION, Record, Abbrev);




More information about the llvm-commits mailing list