[llvm-commits] [llvm] r120860 - /llvm/trunk/tools/lto/LTOCodeGenerator.cpp

Rafael Espíndola rafael.espindola at gmail.com
Fri Dec 3 19:36:39 PST 2010


> Do not try luck by using given name to create temporary file. In parallel builds it may not work.

Is this a bug in the Path API?  The documentation says

      bool createTemporaryFileOnDisk(
        bool reuse_current = false, ///< When set to true, this parameter
          ///< indicates that if the current file name does not exist then
          ///< it will be used without modification.

So I would assume that if the name does exist a new one is created.

> Modified:
>    llvm/trunk/tools/lto/LTOCodeGenerator.cpp
>
> Modified: llvm/trunk/tools/lto/LTOCodeGenerator.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/lto/LTOCodeGenerator.cpp?rev=120860&r1=120859&r2=120860&view=diff
> ==============================================================================
> --- llvm/trunk/tools/lto/LTOCodeGenerator.cpp (original)
> +++ llvm/trunk/tools/lto/LTOCodeGenerator.cpp Fri Dec  3 17:58:31 2010
> @@ -209,7 +209,7 @@
>
>     // make unique temp .o file to put generated object file
>     sys::PathWithStatus uniqueObjPath("lto-llvm.o");
> -    if ( uniqueObjPath.createTemporaryFileOnDisk(true, &errMsg) ) {
> +    if ( uniqueObjPath.createTemporaryFileOnDisk(false, &errMsg) ) {
>         uniqueAsmPath.eraseFromDisk();
>         return NULL;
>     }
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>




More information about the llvm-commits mailing list