ELF: Use StringRef instead of std::string.

All MemoryBuffers for archive files are guaranteed to exist as long
as their children are used in the linker. So we don't need to copy
strings here. Thanks to Sean Silva for pointing this out.

llvm-svn: 259554
This commit is contained in:
Rui Ueyama 2016-02-02 20:24:31 +00:00
parent b8fb2ba1bb
commit 8a789e0204
1 changed files with 1 additions and 1 deletions

View File

@ -41,7 +41,7 @@ public:
// Filename of .a which contained this file. If this file was
// not in an archive file, it is the empty string. We use this
// string for creating error messages.
std::string ArchiveName;
StringRef ArchiveName;
protected:
InputFile(Kind K, MemoryBufferRef M) : MB(M), FileKind(K) {}