From 91b640abfc564ce58b3bfa5cbda610b5749cf20e Mon Sep 17 00:00:00 2001 From: Daniel Dunbar Date: Fri, 18 Dec 2009 20:58:47 +0000 Subject: [PATCH] Fix a few MSVC warnings. llvm-svn: 91714 --- clang/lib/CodeGen/CGBuiltin.cpp | 4 +--- clang/lib/Frontend/PCHWriter.cpp | 8 ++++---- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/clang/lib/CodeGen/CGBuiltin.cpp b/clang/lib/CodeGen/CGBuiltin.cpp index a3f83a77be53..a791fd04f4f6 100644 --- a/clang/lib/CodeGen/CGBuiltin.cpp +++ b/clang/lib/CodeGen/CGBuiltin.cpp @@ -853,7 +853,5 @@ Value *CodeGenFunction::EmitX86BuiltinExpr(unsigned BuiltinID, Value *CodeGenFunction::EmitPPCBuiltinExpr(unsigned BuiltinID, const CallExpr *E) { - switch (BuiltinID) { - default: return 0; - } + return 0; } diff --git a/clang/lib/Frontend/PCHWriter.cpp b/clang/lib/Frontend/PCHWriter.cpp index 681c1ff32cb0..0e4516877de2 100644 --- a/clang/lib/Frontend/PCHWriter.cpp +++ b/clang/lib/Frontend/PCHWriter.cpp @@ -1645,10 +1645,10 @@ public: II->hasMacroDefinition() && !PP.getMacroInfo(const_cast(II))->isBuiltinMacro(); Bits = (uint32_t)II->getObjCOrBuiltinID(); - Bits = (Bits << 1) | hasMacroDefinition; - Bits = (Bits << 1) | II->isExtensionToken(); - Bits = (Bits << 1) | II->isPoisoned(); - Bits = (Bits << 1) | II->isCPlusPlusOperatorKeyword(); + Bits = (Bits << 1) | unsigned(hasMacroDefinition); + Bits = (Bits << 1) | unsigned(II->isExtensionToken()); + Bits = (Bits << 1) | unsigned(II->isPoisoned()); + Bits = (Bits << 1) | unsigned(II->isCPlusPlusOperatorKeyword()); clang::io::Emit16(Out, Bits); if (hasMacroDefinition)