[PATCH] D76461: [llvm-ar] Use target triple to deduce archive kind for bitcode inputs
Fangrui Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Mar 20 11:55:25 PDT 2020
MaskRay added inline comments.
================
Comment at: llvm/test/tools/llvm-ar/lto-kind-from-triple.test:20
+# RUN: llvm-ar crs %t.ar %t.o
+# RUN: grep -q __.SYMDEF %t.ar
----------------
Add another test demonstrating that adding %t.macho.ll will not change GNU format to darwin format.
================
Comment at: llvm/tools/llvm-ar/llvm-ar.cpp:897
+ if (identify_magic(MemBufferRef.getBuffer()) == file_magic::bitcode) {
+ auto ObjOrErr = object::SymbolicFile::createSymbolicFile(
+ MemBufferRef, file_magic::bitcode, &Context);
----------------
Optional: you can write
if (auto ObjOrErr = ...) {
} else {
consumeError(ObjOrErr.takeError());
}
================
Comment at: llvm/tools/llvm-ar/llvm-ar.cpp:906
+ }
+ // squelch the error in case this was not a SymbolicFile.
+ consumeError(ObjOrErr.takeError());
----------------
Nit: capitalize the initial word in the comment.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D76461/new/
https://reviews.llvm.org/D76461
More information about the llvm-commits
mailing list