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 | 152172009af6cdea927bd2810f79073c298e2948 (patch) | |
tree | 74b4c5842a9f83f1381bcccfb7859c0fcc8a7be1 /llvm/lib/Support/SourceMgr.cpp | |
parent | 3ab3467cefaab32c0d5c01f11444a2400e5e84c1 (diff) | |
download | llvm-152172009af6cdea927bd2810f79073c298e2948.zip llvm-152172009af6cdea927bd2810f79073c298e2948.tar.gz llvm-152172009af6cdea927bd2810f79073c298e2948.tar.bz2 |
Fix hardcoded slash to native path seperator which was exposed from llvm::sys::path.
http://reviews.llvm.org/D3687
llvm-svn: 208980
Diffstat (limited to 'llvm/lib/Support/SourceMgr.cpp')
-rw-r--r-- | llvm/lib/Support/SourceMgr.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/Support/SourceMgr.cpp b/llvm/lib/Support/SourceMgr.cpp index ca68289..acd75fb 100644 --- a/llvm/lib/Support/SourceMgr.cpp +++ b/llvm/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); } |