summaryrefslogtreecommitdiff
path: root/lldb/source/Plugins/ObjectContainer
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2020-07-26 19:36:28 +0000
committerDimitry Andric <dim@FreeBSD.org>2020-07-26 19:36:28 +0000
commitcfca06d7963fa0909f90483b42a6d7d194d01e08 (patch)
tree209fb2a2d68f8f277793fc8df46c753d31bc853b /lldb/source/Plugins/ObjectContainer
parent706b4fc47bbc608932d3b491ae19a3b9cde9497b (diff)
Notes
Diffstat (limited to 'lldb/source/Plugins/ObjectContainer')
-rw-r--r--lldb/source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.cpp6
-rw-r--r--lldb/source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.h6
2 files changed, 7 insertions, 5 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.
diff --git a/lldb/source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.h b/lldb/source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.h
index 5d9c01315a66..f6862afff8a0 100644
--- a/lldb/source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.h
+++ b/lldb/source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.h
@@ -6,8 +6,8 @@
//
//===----------------------------------------------------------------------===//
-#ifndef liblldb_ObjectContainerBSDArchive_h_
-#define liblldb_ObjectContainerBSDArchive_h_
+#ifndef LLDB_SOURCE_PLUGINS_OBJECTCONTAINER_BSD_ARCHIVE_OBJECTCONTAINERBSDARCHIVE_H
+#define LLDB_SOURCE_PLUGINS_OBJECTCONTAINER_BSD_ARCHIVE_OBJECTCONTAINERBSDARCHIVE_H
#include "lldb/Core/UniqueCStringMap.h"
#include "lldb/Symbol/ObjectContainer.h"
@@ -174,4 +174,4 @@ protected:
Archive::shared_ptr m_archive_sp;
};
-#endif // liblldb_ObjectContainerBSDArchive_h_
+#endif // LLDB_SOURCE_PLUGINS_OBJECTCONTAINER_BSD_ARCHIVE_OBJECTCONTAINERBSDARCHIVE_H