[llvm] r234957 - uselistorder: Pull the bit through WriteToBitcodFile()

Duncan P. N. Exon Smith dexonsmith at apple.com
Tue Apr 14 17:20:30 PDT 2015


> On 2015-Apr-14, at 17:10, Duncan P. N. Exon Smith <dexonsmith at apple.com> wrote:
> 
> Modified: llvm/trunk/tools/gold/gold-plugin.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/gold/gold-plugin.cpp?rev=234957&r1=234956&r2=234957&view=diff
> ==============================================================================
> --- llvm/trunk/tools/gold/gold-plugin.cpp (original)
> +++ llvm/trunk/tools/gold/gold-plugin.cpp Tue Apr 14 19:10:50 2015
> @@ -734,12 +734,13 @@ static void runLTOPasses(Module &M, Targ
>   passes.run(M);
> }
> 
> -static void saveBCFile(StringRef Path, Module &M) {
> +static void saveBCFile(StringRef Path, Module &M,
> +                       bool ShouldPreserveUseListOrder) {

(This was fixed by r234958; apparently I don't build this.)

>   std::error_code EC;
>   raw_fd_ostream OS(Path, EC, sys::fs::OpenFlags::F_None);
>   if (EC)
>     message(LDPL_FATAL, "Failed to write the output file.");
> -  WriteBitcodeToFile(&M, OS);
> +  WriteBitcodeToFile(&M, OS, /* ShouldPreserveUseListOrder */ true);

@Rafael and Nick, `saveBCFile()` is only used for `OT_SAVE_TEMPS`, so
I took the liberty of turning this on.

Let me know if you disagree and I'll revert that part of the commit.

> }
> 
> static void codegen(Module &M) {
> 





More information about the llvm-commits mailing list