From: Vedant Kumar Date: Wed, 27 Jul 2016 03:43:34 +0000 (+0000) Subject: Fix for compiling with clang <= 3.7 and g++6 headers X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=57d0d311322c8cfc8516ce35279881f0773d8564;p=clang Fix for compiling with clang <= 3.7 and g++6 headers Make integers explicitly unsigned, so the tuple constructor will resolve properly when but with clang 3.6, 3.7 and gcc 6.1.1 libstdc++ headers. Patch by Frederich Munch! Differential Revision: https://reviews.llvm.org/D22798 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@276831 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Driver/Tools.cpp b/lib/Driver/Tools.cpp index 4038f0f5df..e747149679 100644 --- a/lib/Driver/Tools.cpp +++ b/lib/Driver/Tools.cpp @@ -3819,13 +3819,13 @@ ParsePICArgs(const ToolChain &ToolChain, const llvm::Triple &Triple, // match that of llvm-gcc and Apple GCC before that. PIC = ToolChain.isPICDefault() && ToolChain.isPICDefaultForced(); - return std::make_tuple(llvm::Reloc::DynamicNoPIC, PIC ? 2 : 0, false); + return std::make_tuple(llvm::Reloc::DynamicNoPIC, PIC ? 2U : 0U, false); } if (PIC) - return std::make_tuple(llvm::Reloc::PIC_, IsPICLevelTwo ? 2 : 1, PIE); + return std::make_tuple(llvm::Reloc::PIC_, IsPICLevelTwo ? 2U : 1U, PIE); - return std::make_tuple(llvm::Reloc::Static, 0, false); + return std::make_tuple(llvm::Reloc::Static, 0U, false); } static const char *RelocationModelName(llvm::Reloc::Model Model) {