aboutsummaryrefslogtreecommitdiff
path: root/llvm/tools/llvm-libtool-darwin/llvm-libtool-darwin.cpp
diff options
context:
space:
mode:
authorAlexander Shaposhnikov <alexshap@fb.com>2020-09-25 16:02:23 -0700
committerAlexander Shaposhnikov <alexshap@fb.com>2020-09-25 16:27:45 -0700
commit97702c3d9234ddc7dd39d4d107c8bec8765746ce (patch)
treed9af7724b5104d6da26c1f5b77ee3fc8353abb96 /llvm/tools/llvm-libtool-darwin/llvm-libtool-darwin.cpp
parentb5f46534c4dd5ac32bc3b63685de1d66eec96595 (diff)
downloadllvm-97702c3d9234ddc7dd39d4d107c8bec8765746ce.zip
llvm-97702c3d9234ddc7dd39d4d107c8bec8765746ce.tar.gz
llvm-97702c3d9234ddc7dd39d4d107c8bec8765746ce.tar.bz2
[Object][MachO] Refine the interface of Slice
This patch performs a minor cleanup of the class Slice: static methods and constructors which take a pointer but assume that it's not null now take the argument by reference. NFC. Test plan: make check-all Differential revision: https://reviews.llvm.org/D88320
Diffstat (limited to 'llvm/tools/llvm-libtool-darwin/llvm-libtool-darwin.cpp')
-rw-r--r--llvm/tools/llvm-libtool-darwin/llvm-libtool-darwin.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/tools/llvm-libtool-darwin/llvm-libtool-darwin.cpp b/llvm/tools/llvm-libtool-darwin/llvm-libtool-darwin.cpp
index 5a7608d..3a08d18 100644
--- a/llvm/tools/llvm-libtool-darwin/llvm-libtool-darwin.cpp
+++ b/llvm/tools/llvm-libtool-darwin/llvm-libtool-darwin.cpp
@@ -377,7 +377,7 @@ buildSlices(ArrayRef<OwningBinary<Archive>> OutputBinaries) {
SmallVector<Slice, 2> Slices;
for (const auto &OB : OutputBinaries) {
- const Archive *A = OB.getBinary();
+ const Archive &A = *OB.getBinary();
Expected<Slice> ArchiveSlice = Slice::create(A);
if (!ArchiveSlice)
return ArchiveSlice.takeError();