Index: cmake/modules/HandleLLVMOptions.cmake =================================================================== --- cmake/modules/HandleLLVMOptions.cmake +++ cmake/modules/HandleLLVMOptions.cmake @@ -274,6 +274,20 @@ -wd4624 # Suppress ''derived class' : destructor could not be generated because a base class destructor is inaccessible' -wd4722 # Suppress 'function' : destructor never returns, potential memory leak -wd4800 # Suppress ''type' : forcing value to bool 'true' or 'false' (performance warning)' + -wd4100 # Suppress 'unreferenced formal parameter' + -wd4127 # Suppress 'conditional expression is constant' + -wd4512 # Suppress 'assignment operator could not be generated' + -wd4505 # Suppress 'unreferenced local function has been removed' + -wd4610 # Suppress ' can never be instantiated' + -wd4510 # Suppress 'default constructor could not be generated' + -wd4702 # Suppress 'unreachable code' + -wd4245 # Suppress 'signed/unsigned mismatch' + -wd4706 # Suppress 'assignment within conditional expression' + -wd4310 # Suppress 'cast truncates constant value' + -wd4701 # Suppress 'potentially uninitialized local variable' + -wd4703 # Suppress 'potentially uninitialized local pointer variable' + -wd4389 # Suppress 'signed/unsigned mismatch' + -wd4611 # Suppress 'interaction between '_setjmp' and C++ object destruction is non-portable' # Promoted warnings. -w14062 # Promote 'enumerator in switch of enum is not handled' to level 1 warning. Index: lib/Support/APFloat.cpp =================================================================== --- lib/Support/APFloat.cpp +++ lib/Support/APFloat.cpp @@ -1430,7 +1430,7 @@ /* Determine if the operation on the absolute values is effectively an addition or subtraction. */ - subtract ^= sign ^ rhs.sign; + subtract ^= (sign ^ rhs.sign) != 0; /* Are we bigger exponent-wise than the RHS? */ bits = exponent - rhs.exponent; Index: lib/Target/ARM/InstPrinter/ARMInstPrinter.cpp =================================================================== --- lib/Target/ARM/InstPrinter/ARMInstPrinter.cpp +++ lib/Target/ARM/InstPrinter/ARMInstPrinter.cpp @@ -638,7 +638,7 @@ unsigned ImmOffs = ARM_AM::getAM5Offset(MO2.getImm()); unsigned Op = ARM_AM::getAM5Op(MO2.getImm()); - if (AlwaysPrintImm0 || ImmOffs || Op == ARM_AM::sub) { + if (ImmOffs || Op == ARM_AM::sub || AlwaysPrintImm0) { O << ", " << markup("getOperand(0).getReg(); - const TargetRegisterInfo *TRI = nvptxSubtarget->getRegisterInfo(); - if (TRI->isVirtualRegister(RegNo)) { + if (TargetRegisterInfo::isVirtualRegister(RegNo)) { OutStreamer.AddComment(Twine("implicit-def: ") + getVirtualRegisterName(RegNo)); } else { Index: lib/Target/PowerPC/PPCInstrInfo.cpp =================================================================== --- lib/Target/PowerPC/PPCInstrInfo.cpp +++ lib/Target/PowerPC/PPCInstrInfo.cpp @@ -113,9 +113,8 @@ const MachineOperand &DefMO = DefMI->getOperand(DefIdx); unsigned Reg = DefMO.getReg(); - const TargetRegisterInfo *TRI = &getRegisterInfo(); bool IsRegCR; - if (TRI->isVirtualRegister(Reg)) { + if (TargetRegisterInfo::isVirtualRegister(Reg)) { const MachineRegisterInfo *MRI = &DefMI->getParent()->getParent()->getRegInfo(); IsRegCR = MRI->getRegClass(Reg)->hasSuperClassEq(&PPC::CRRCRegClass) || Index: tools/llvm-c-test/metadata.c =================================================================== --- tools/llvm-c-test/metadata.c +++ tools/llvm-c-test/metadata.c @@ -17,7 +17,8 @@ int add_named_metadata_operand(void) { LLVMModuleRef m = LLVMModuleCreateWithName("Mod"); - LLVMValueRef values[] = { LLVMConstInt(LLVMInt32Type(), 0, 0) }; + LLVMValueRef values[1]; + values[0] = LLVMConstInt(LLVMInt32Type(), 0, 0); // This used to trigger an assertion LLVMAddNamedMetadataOperand(m, "name", LLVMMDNode(values, 1)); @@ -29,7 +30,8 @@ int set_metadata(void) { LLVMBuilderRef b = LLVMCreateBuilder(); - LLVMValueRef values[] = { LLVMConstInt(LLVMInt32Type(), 0, 0) }; + LLVMValueRef values[1]; + values[0] = LLVMConstInt(LLVMInt32Type(), 0, 0); // This used to trigger an assertion LLVMSetMetadata(