aboutsummaryrefslogtreecommitdiff
path: root/lib/Tooling
diff options
context:
space:
mode:
authorNAKAMURA Takumi <geek4civic@gmail.com>2012-06-02 15:34:21 +0000
committerNAKAMURA Takumi <geek4civic@gmail.com>2012-06-02 15:34:21 +0000
commit0ef8db20b32aaa027c2fbd230c46c22b4b47079d (patch)
treea0cba86f8ba31228cc03279ffc93a396df8033b9 /lib/Tooling
parent5e62779634ba002d7112a66efc8e075de9b8a3f1 (diff)
ToolInvocation::mapVirtualFile(): Tweak for Win32. Handle the key as native path.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157889 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Tooling')
-rw-r--r--lib/Tooling/Tooling.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/Tooling/Tooling.cpp b/lib/Tooling/Tooling.cpp
index 50612cb982..0c9fa43606 100644
--- a/lib/Tooling/Tooling.cpp
+++ b/lib/Tooling/Tooling.cpp
@@ -166,7 +166,9 @@ ToolInvocation::ToolInvocation(
}
void ToolInvocation::mapVirtualFile(StringRef FilePath, StringRef Content) {
- MappedFileContents[FilePath] = Content;
+ SmallString<1024> PathStorage;
+ llvm::sys::path::native(FilePath, PathStorage);
+ MappedFileContents[PathStorage] = Content;
}
bool ToolInvocation::run() {