r247932 - Try to unbreak windows compiler after r247926.

David Blaikie via cfe-commits cfe-commits at lists.llvm.org
Thu Sep 17 13:28:09 PDT 2015


On Thu, Sep 17, 2015 at 1:25 PM, Douglas Katzman via cfe-commits <
cfe-commits at lists.llvm.org> wrote:

> Author: dougk
> Date: Thu Sep 17 15:25:09 2015
> New Revision: 247932
>
> URL: http://llvm.org/viewvc/llvm-project?rev=247932&view=rev
> Log:
> Try to unbreak windows compiler after r247926.
>
> It might not like {} implicitly cast to an Arrayref.
> That's the theory, since I can't test it.
>

ArrayRef<T> can be implicitly constructed from None:

ArrayRef<std::string> ExtraTripleAliases = None

should do the trick

(oh, and top-level const as you've got there isn't commonly used in LLVM
(certainly not in function declarations where it's meaningless) so perhaps
you could drop that)


>
> Modified:
>     cfe/trunk/lib/Driver/ToolChains.h
>
> Modified: cfe/trunk/lib/Driver/ToolChains.h
> URL:
> http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/ToolChains.h?rev=247932&r1=247931&r2=247932&view=diff
>
> ==============================================================================
> --- cfe/trunk/lib/Driver/ToolChains.h (original)
> +++ cfe/trunk/lib/Driver/ToolChains.h Thu Sep 17 15:25:09 2015
> @@ -102,7 +102,8 @@ public:
>      GCCInstallationDetector() : IsValid(false) {}
>      void init(const Driver &D, const llvm::Triple &TargetTriple,
>                const llvm::opt::ArgList &Args,
> -              const ArrayRef<std::string> ExtraTripleAliases = {});
> +              const ArrayRef<std::string> ExtraTripleAliases =
> +                  ArrayRef<std::string>());
>
>      /// \brief Check whether we detected a valid GCC install.
>      bool isValid() const { return IsValid; }
>
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20150917/f2386bb0/attachment-0001.html>


More information about the cfe-commits mailing list