[PATCH] D145509: [HIP] Fix temporary files
Artem Belevich via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Mar 7 10:15:12 PST 2023
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
More information about the cfe-commits
mailing list