summaryrefslogtreecommitdiff
path: root/tools/llvm-ar/Archive.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tools/llvm-ar/Archive.cpp')
-rw-r--r--tools/llvm-ar/Archive.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/tools/llvm-ar/Archive.cpp b/tools/llvm-ar/Archive.cpp
index 9086d4e42e..70fddcfe4d 100644
--- a/tools/llvm-ar/Archive.cpp
+++ b/tools/llvm-ar/Archive.cpp
@@ -67,7 +67,7 @@ ArchiveMember::ArchiveMember(Archive* PAR)
// This method allows an ArchiveMember to be replaced with the data for a
// different file, presumably as an update to the member. It also makes sure
// the flags are reset correctly.
-bool ArchiveMember::replaceWith(const sys::Path& newFile, std::string* ErrMsg) {
+bool ArchiveMember::replaceWith(StringRef newFile, std::string* ErrMsg) {
bool Exists;
if (sys::fs::exists(newFile.str(), Exists) || !Exists) {
if (ErrMsg)
@@ -136,10 +136,9 @@ bool ArchiveMember::replaceWith(const sys::Path& newFile, std::string* ErrMsg) {
// Archive constructor - this is the only constructor that gets used for the
// Archive class. Everything else (default,copy) is deprecated. This just
// initializes and maps the file into memory, if requested.
-Archive::Archive(const sys::Path& filename, LLVMContext& C)
- : archPath(filename), members(), mapfile(0), base(0), symTab(), strtab(),
- symTabSize(0), firstFileOffset(0), modules(), foreignST(0), Context(C) {
-}
+Archive::Archive(StringRef filename, LLVMContext &C)
+ : archPath(filename), members(), mapfile(0), base(0), symTab(), strtab(),
+ symTabSize(0), firstFileOffset(0), modules(), foreignST(0), Context(C) {}
bool
Archive::mapToMemory(std::string* ErrMsg) {