diff options
Diffstat (limited to 'lldb/source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.cpp')
-rw-r--r-- | lldb/source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lldb/source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.cpp b/lldb/source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.cpp index 512b5bebf07f..83cf9f8bd269 100644 --- a/lldb/source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.cpp +++ b/lldb/source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.cpp @@ -1,4 +1,4 @@ -//===-- ObjectContainerBSDArchive.cpp ---------------------------*- C++ -*-===// +//===-- ObjectContainerBSDArchive.cpp -------------------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. @@ -40,6 +40,8 @@ typedef struct ar_hdr { using namespace lldb; using namespace lldb_private; +LLDB_PLUGIN_DEFINE(ObjectContainerBSDArchive) + ObjectContainerBSDArchive::Object::Object() : ar_name(), modification_time(0), uid(0), gid(0), mode(0), size(0), file_offset(0), file_size(0) {} @@ -86,7 +88,7 @@ ObjectContainerBSDArchive::Object::Extract(const DataExtractor &data, return LLDB_INVALID_OFFSET; str.assign((const char *)data.GetData(&offset, 16), 16); - if (str.find("#1/") == 0) { + if (llvm::StringRef(str).startswith("#1/")) { // If the name is longer than 16 bytes, or contains an embedded space then // it will use this format where the length of the name is here and the // name characters are after this header. |