tra added a comment.

LGTM, but we should probably get someone familiar with macos to chime in, just 
in case there may be some reason behind macos using temp directories here.

> This change is OK for MacOS as lipo does not requires specific

I'm curious why lipo has been singled out. Is that the only use case that ends 
up using this path?



================
Comment at: clang/lib/Driver/Driver.cpp:5567-5572
     if (MultipleArchs && !BoundArch.empty()) {
-      TmpName = GetTemporaryDirectory(Prefix);
-      llvm::sys::path::append(TmpName,
-                              Twine(Prefix) + "-" + BoundArch + "." + Suffix);
+      TmpName =
+          GetTemporaryPath((Twine(Prefix) + "-" + BoundArch).str(), Suffix);
     } else {
       TmpName = GetTemporaryPath(Prefix, Suffix);
     }
----------------
This could now be shortened to:
```
      TmpName = (MultipleArchs && !BoundArch.empty()) 
          ? GetTemporaryPath((Twine(Prefix) + "-" + BoundArch).str(), Suffix)
          : GetTemporaryPath(Prefix, Suffix);
```



CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D145509/new/

https://reviews.llvm.org/D145509

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to