================ @@ -599,9 +599,11 @@ Expected<StringRef> writeOffloadFile(const OffloadFile &File) { StringRef Prefix = sys::path::stem(Binary.getMemoryBufferRef().getBufferIdentifier()); - - auto TempFileOrErr = createOutputFile( - Prefix + "-" + Binary.getTriple() + "-" + Binary.getArch(), "o"); + SmallString<128> Filename; + (Prefix + "-" + Binary.getTriple() + "-" + Binary.getArch()) + .toNullTerminatedStringRef(Filename); ---------------- Meinersbur wrote:
```suggestion .toVector(Filename); ``` The return value of `toNullTerminatedStringRef` is not used. If there is a shortcut, `toNullTerminatedStringRef` doesn't even update the SmallVector, so this would potentially incorrect. https://github.com/llvm/llvm-project/pull/130285 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits