From e1a4427ccb6e29e63c11e63224460a92ee66de37 Mon Sep 17 00:00:00 2001 From: Benjamin Kramer Date: Wed, 22 Feb 2012 13:42:11 +0000 Subject: Remove static ctor. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151160 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Object/Archive.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/Object/Archive.cpp') diff --git a/lib/Object/Archive.cpp b/lib/Object/Archive.cpp index ad1cde0d25..b67377c634 100644 --- a/lib/Object/Archive.cpp +++ b/lib/Object/Archive.cpp @@ -19,7 +19,7 @@ using namespace llvm; using namespace object; -static const StringRef Magic = "!\n"; +static const char *Magic = "!\n"; namespace { struct ArchiveMemberHeader { @@ -200,7 +200,7 @@ Archive::Archive(MemoryBuffer *source, error_code &ec) } Archive::child_iterator Archive::begin_children(bool skip_internal) const { - const char *Loc = Data->getBufferStart() + Magic.size(); + const char *Loc = Data->getBufferStart() + strlen(Magic); size_t Size = sizeof(ArchiveMemberHeader) + ToHeader(Loc)->getSize(); Child c(this, StringRef(Loc, Size)); -- cgit v1.2.3