From c79c2be7d2ab7e562c0cac2578270a9f28057e4d Mon Sep 17 00:00:00 2001 From: Aaron Ballman Date: Sun, 24 Apr 2016 13:03:20 +0000 Subject: Silence two C4806 warnings ('|': unsafe operation: no value of type 'bool' promoted to type 'const unsigned int' can equal the given constant). The fact that they trigger with this code seems like it may be a bug, but the warning itself is still generally useful enough to retain it for now. llvm-svn: 267337 --- llvm/lib/Bitcode/Writer/BitcodeWriter.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'llvm/lib/Bitcode/Writer/BitcodeWriter.cpp') diff --git a/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp b/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp index fcce553..715d66f 100644 --- a/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp +++ b/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp @@ -1288,7 +1288,7 @@ void ModuleBitcodeWriter::writeDICompositeType( const DICompositeType *N, SmallVectorImpl &Record, unsigned Abbrev) { const unsigned IsNotUsedInOldTypeRef = 0x2; - Record.push_back(IsNotUsedInOldTypeRef | N->isDistinct()); + Record.push_back(IsNotUsedInOldTypeRef | (unsigned)N->isDistinct()); Record.push_back(N->getTag()); Record.push_back(VE.getMetadataOrNullID(N->getRawName())); Record.push_back(VE.getMetadataOrNullID(N->getFile())); @@ -1313,7 +1313,7 @@ void ModuleBitcodeWriter::writeDISubroutineType( const DISubroutineType *N, SmallVectorImpl &Record, unsigned Abbrev) { const unsigned HasNoOldTypeRefs = 0x2; - Record.push_back(HasNoOldTypeRefs | N->isDistinct()); + Record.push_back(HasNoOldTypeRefs | (unsigned)N->isDistinct()); Record.push_back(N->getFlags()); Record.push_back(VE.getMetadataOrNullID(N->getTypeArray().get())); -- cgit v1.1