Index: include/llvm-c/Core.h =================================================================== --- include/llvm-c/Core.h +++ include/llvm-c/Core.h @@ -159,7 +159,7 @@ LLVMStackAlignment = 7<<26, LLVMReturnsTwice = 1 << 29, LLVMUWTable = 1 << 30, - LLVMNonLazyBind = 1 << 31 + LLVMNonLazyBind = 1U << 31 /* FIXME: These attributes are currently not included in the C API as a temporary measure until the API/ABI impact to the C API is understood Index: include/llvm/CodeGen/MachORelocation.h =================================================================== --- include/llvm/CodeGen/MachORelocation.h +++ include/llvm/CodeGen/MachORelocation.h @@ -35,7 +35,7 @@ public: uint32_t getPackedFields() const { if (r_scattered) - return (1 << 31) | (r_pcrel << 30) | ((r_length & 3) << 28) | + return (1U << 31) | (r_pcrel << 30) | ((r_length & 3) << 28) | ((r_type & 15) << 24) | (r_address & 0x00FFFFFF); else return (r_symbolnum << 8) | (r_pcrel << 7) | ((r_length & 3) << 5) | Index: lib/CodeGen/SelectionDAG/SelectionDAG.cpp =================================================================== --- lib/CodeGen/SelectionDAG/SelectionDAG.cpp +++ lib/CodeGen/SelectionDAG/SelectionDAG.cpp @@ -6380,14 +6380,14 @@ llvm::ComputeMaskedBits(const_cast(GV), KnownZero, KnownOne, TLI->getDataLayout()); unsigned AlignBits = KnownZero.countTrailingOnes(); - unsigned Align = AlignBits ? 1 << std::min(31U, AlignBits) : 0; + unsigned Align = AlignBits ? 1U << std::min(31U, AlignBits) : 0; if (Align) return MinAlign(Align, GVOffset); } // If this is a direct reference to a stack slot, use information about the // stack slot's alignment. - int FrameIdx = 1 << 31; + int FrameIdx = 1U << 31; int64_t FrameOffset = 0; if (FrameIndexSDNode *FI = dyn_cast(Ptr)) { FrameIdx = FI->getIndex(); @@ -6398,7 +6398,7 @@ FrameOffset = Ptr.getConstantOperandVal(1); } - if (FrameIdx != (1 << 31)) { + if (FrameIdx != (1U << 31)) { const MachineFrameInfo &MFI = *getMachineFunction().getFrameInfo(); unsigned FIInfoAlign = MinAlign(MFI.getObjectAlignment(FrameIdx), FrameOffset);