summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRui Ueyama <ruiu@google.com>2016-02-02 20:24:31 +0000
committerRui Ueyama <ruiu@google.com>2016-02-02 20:24:31 +0000
commit8a789e0204a2e03b6907ee0da45fb68fba2e0841 (patch)
treededef06632ff340eefbf48094b581de76c99f9da
parentb8fb2ba1bb3116d7cf84c3e317968377a690d35a (diff)
downloadbcm5719-llvm-8a789e0204a2e03b6907ee0da45fb68fba2e0841.tar.gz
bcm5719-llvm-8a789e0204a2e03b6907ee0da45fb68fba2e0841.zip
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
-rw-r--r--lld/ELF/InputFiles.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/lld/ELF/InputFiles.h b/lld/ELF/InputFiles.h
index 8ed49b9d393..374bdd8c9aa 100644
--- a/lld/ELF/InputFiles.h
+++ b/lld/ELF/InputFiles.h
@@ -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) {}
OpenPOWER on IntegriCloud