aboutsummaryrefslogtreecommitdiff
path: root/lib/Serialization/ASTReader.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Serialization/ASTReader.cpp')
-rw-r--r--lib/Serialization/ASTReader.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/lib/Serialization/ASTReader.cpp b/lib/Serialization/ASTReader.cpp
index 48578569d5..874d2c4b1b 100644
--- a/lib/Serialization/ASTReader.cpp
+++ b/lib/Serialization/ASTReader.cpp
@@ -1679,19 +1679,19 @@ const FileEntry *ASTReader::getFileEntry(StringRef filenameStrRef) {
/// \brief If we are loading a relocatable PCH file, and the filename is
/// not an absolute path, add the system root to the beginning of the file
/// name.
-StringRef ASTReader::MaybeAddSystemRootToFilename(ModuleFile &M,
- std::string &Filename) {
+void ASTReader::MaybeAddSystemRootToFilename(ModuleFile &M,
+ std::string &Filename) {
// If this is not a relocatable PCH file, there's nothing to do.
if (!M.RelocatablePCH)
- return Filename;
+ return;
if (Filename.empty() || llvm::sys::path::is_absolute(Filename))
- return Filename;
+ return;
if (isysroot.empty()) {
// If no system root was given, default to '/'
Filename.insert(Filename.begin(), '/');
- return Filename;
+ return;
}
unsigned Length = isysroot.size();
@@ -1699,7 +1699,6 @@ StringRef ASTReader::MaybeAddSystemRootToFilename(ModuleFile &M,
Filename.insert(Filename.begin(), '/');
Filename.insert(Filename.begin(), isysroot.begin(), isysroot.end());
- return Filename;
}
ASTReader::ASTReadResult