================
@@ -165,6 +165,21 @@ void diagnosticHandler(const DiagnosticInfo &DI) {
}
}
+bool hasFatBinary(const ArgList &Args, MemoryBufferRef Buffer) {
+ if (Args.hasArg(OPT_dry_run) && Args.hasArg(OPT_assume_device_object))
+ return false;
+ if (identify_magic(Buffer.getBuffer()) != file_magic::elf_relocatable)
+ return false;
+ Expected<std::unique_ptr<ObjectFile>> ObjFile =
+ ObjectFile::createObjectFile(Buffer);
+ if (!ObjFile) {
+ consumeError(ObjFile.takeError());
+ return false;
+ }
----------------
jhuber6 wrote:
Right, forgot to put `!` in front of it
https://github.com/llvm/llvm-project/pull/165519
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits