diff options
author | Yaron Keren <yaron.keren@gmail.com> | 2014-05-16 13:16:30 +0000 |
---|---|---|
committer | Yaron Keren <yaron.keren@gmail.com> | 2014-05-16 13:16:30 +0000 |
commit | 0d356ec0eebb3fbbb2de0a12743457d44341a047 (patch) | |
tree | c8deaeea748dd2b64b81375e4acd9a35e7dfae10 /lib/Support/SourceMgr.cpp | |
parent | 21cfedee056a1e0789bbe6cafa23549d0ff16f24 (diff) | |
download | llvm-0d356ec0eebb3fbbb2de0a12743457d44341a047.tar.gz llvm-0d356ec0eebb3fbbb2de0a12743457d44341a047.tar.bz2 llvm-0d356ec0eebb3fbbb2de0a12743457d44341a047.tar.xz |
Fix hardcoded slash to native path seperator which was exposed from llvm::sys::path.
http://reviews.llvm.org/D3687
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208980 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Support/SourceMgr.cpp')
-rw-r--r-- | lib/Support/SourceMgr.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Support/SourceMgr.cpp b/lib/Support/SourceMgr.cpp index ca68289796..acd75fbbd1 100644 --- a/lib/Support/SourceMgr.cpp +++ b/lib/Support/SourceMgr.cpp @@ -18,6 +18,7 @@ #include "llvm/ADT/Twine.h" #include "llvm/Support/Locale.h" #include "llvm/Support/MemoryBuffer.h" +#include "llvm/Support/Path.h" #include "llvm/Support/raw_ostream.h" #include "llvm/Support/system_error.h" using namespace llvm; @@ -60,7 +61,7 @@ size_t SourceMgr::AddIncludeFile(const std::string &Filename, // If the file didn't exist directly, see if it's in an include path. for (unsigned i = 0, e = IncludeDirectories.size(); i != e && !NewBuf; ++i) { - IncludedFile = IncludeDirectories[i] + "/" + Filename; + IncludedFile = IncludeDirectories[i] + sys::path::get_separator().data() + Filename; MemoryBuffer::getFile(IncludedFile.c_str(), NewBuf); } |