[Libclc-dev] [PATCH 1/1] prepare_builtins: Fix compile breakage with older LLVM

Tom Stellard via Libclc-dev libclc-dev at lists.llvm.org
Mon Sep 25 08:58:02 PDT 2017


On 09/23/2017 03:40 PM, Jan Vesely via Libclc-dev wrote:
> Fixes r314050
> 

LGTM.
> Signed-off-by: Jan Vesely <jan.vesely at rutgers.edu>
> ---
>  utils/prepare-builtins.cpp | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/utils/prepare-builtins.cpp b/utils/prepare-builtins.cpp
> index 009c318..0f03e05 100644
> --- a/utils/prepare-builtins.cpp
> +++ b/utils/prepare-builtins.cpp
> @@ -93,8 +93,13 @@ int main(int argc, char **argv) {
>    }
>  
>    std::error_code EC;
> +#if HAVE_LLVM >= 0x0600
>    std::unique_ptr<ToolOutputFile> Out(
>        new ToolOutputFile(OutputFilename, EC, sys::fs::F_None));
> +#else
> +  std::unique_ptr<tool_output_file> Out(
> +      new tool_output_file(OutputFilename, EC, sys::fs::F_None));
> +#endif
>    if (EC) {
>      errs() << EC.message() << '\n';
>      exit(1);
> 



More information about the Libclc-dev mailing list