[lld] r291413 - Add linker-script-included files to reproduce tar files.

Rafael Avila de Espindola via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 9 08:32:36 PST 2017


Rui Ueyama via llvm-commits <llvm-commits at lists.llvm.org> writes:

> Author: ruiu
> Date: Sun Jan  8 19:42:02 2017
> New Revision: 291413
>
> URL: http://llvm.org/viewvc/llvm-project?rev=291413&view=rev
> Log:
> Add linker-script-included files to reproduce tar files.
>
> Previously, files added using INCLUDE directive weren't added
> to reproduce archives. In this patch, I defined a function to
> open a file and use that from Driver and LinkerScript.

Thanks!

> +  if (sys::fs::exists(Tok)) {
> +    if (Optional<MemoryBufferRef> MB = readFile(Tok))
> +      tokenize(*MB);
> +    return;
> +  }

Why do you need to use sys::fs::exists? Can't you just check the return
of readFile?

Cheers,
Rafael


More information about the llvm-commits mailing list