JonChesterfield added inline comments.
================
Comment at: clang/lib/CodeGen/BackendUtil.cpp:1760
+ for (StringRef OffloadObject : CGOpts.OffloadObjects) {
+ auto FilenameAndSection = OffloadObject.split(',');
+ llvm::ErrorOr<std::unique_ptr<llvm::MemoryBuffer>> ObjectOrErr =
----------------
JonChesterfield wrote:
> Could we have a type here instead of auto? I'm trying to guess what a
> StringRef split might return and there seems to be a few choices. If it's a
> container of some sort we could error on size() != 2
Nvm, it's a pair.
We could add
```if (OffloadObject.count(',') !=1 ) {
Diags.Report(DiagID) << OffloadObject;
return;
}```
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D116542/new/
https://reviews.llvm.org/D116542
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits