summaryrefslogtreecommitdiffstats
path: root/clang/lib/Lex/HeaderMap.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/Lex/HeaderMap.cpp')
-rw-r--r--clang/lib/Lex/HeaderMap.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/clang/lib/Lex/HeaderMap.cpp b/clang/lib/Lex/HeaderMap.cpp
index e424f916551..90ed184a570 100644
--- a/clang/lib/Lex/HeaderMap.cpp
+++ b/clang/lib/Lex/HeaderMap.cpp
@@ -199,8 +199,9 @@ void HeaderMap::dump() const {
/// LookupFile - Check to see if the specified relative filename is located in
/// this HeaderMap. If so, open it and return its FileEntry.
-const FileEntry *HeaderMap::LookupFile(llvm::StringRef Filename,
- FileManager &FM) const {
+const FileEntry *HeaderMap::LookupFile(
+ llvm::StringRef Filename, FileManager &FM,
+ llvm::SmallVectorImpl<char> *RawPath) const {
const HMapHeader &Hdr = getHeader();
unsigned NumBuckets = getEndianAdjustedWord(Hdr.NumBuckets);
@@ -223,6 +224,8 @@ const FileEntry *HeaderMap::LookupFile(llvm::StringRef Filename,
llvm::SmallString<1024> DestPath;
DestPath += getString(B.Prefix);
DestPath += getString(B.Suffix);
+ if (RawPath != NULL)
+ *RawPath = DestPath;
return FM.getFile(DestPath.str());
}
}
OpenPOWER on IntegriCloud