[llvm] [Object] Remove restriction universal archives having both IR and native (PR #67505)
Alexander Shaposhnikov via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 2 12:43:34 PDT 2023
================
@@ -117,10 +117,16 @@ static Expected<MachoCPUTy> getMachoCPUFromTriple(StringRef TT) {
return getMachoCPUFromTriple(Triple{TT});
}
+static Expected<MachoCPUTy>
+getMachoCPUFromObjectFile(const MachOObjectFile *O) {
+ return std::make_pair(O->getHeader().cputype, O->getHeader().cpusubtype);
----------------
alexander-shaposhnikov wrote:
It looks like Expected might be unnecessary here
nit: since O is not null, maybe just pass const MachObjectFile &O
https://github.com/llvm/llvm-project/pull/67505
More information about the llvm-commits
mailing list