Index: llvm/trunk/include/llvm/ADT/Twine.h =================================================================== --- llvm/trunk/include/llvm/ADT/Twine.h +++ llvm/trunk/include/llvm/ADT/Twine.h @@ -274,6 +274,9 @@ assert(isValid() && "Invalid twine!"); } + /// Delete the implicit conversion from nullptr as Twine(const char *) + /// cannot take nullptr. + /*implicit*/ Twine(std::nullptr_t) = delete; /// Construct from an std::string. /*implicit*/ Twine(const std::string &Str) : LHSKind(StdStringKind) { Index: llvm/trunk/include/llvm/IR/IRBuilder.h =================================================================== --- llvm/trunk/include/llvm/IR/IRBuilder.h +++ llvm/trunk/include/llvm/IR/IRBuilder.h @@ -1004,7 +1004,7 @@ } Value *foldConstant(Instruction::BinaryOps Opc, Value *L, - Value *R, const Twine &Name = nullptr) const { + Value *R, const Twine &Name) const { auto *LC = dyn_cast(L); auto *RC = dyn_cast(R); return (LC && RC) ? Insert(Folder.CreateBinOp(Opc, LC, RC), Name) : nullptr;