summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Storsjo <martin@martin.st>2019-04-25 20:03:20 +0000
committerMartin Storsjo <martin@martin.st>2019-04-25 20:03:20 +0000
commitceb71e887b8ed25594740ab7ac9419baf1e3c1e0 (patch)
tree4bd6136aa4541efa4c74dcc7016b5793771a1fb6
parentae62727a28d86ed4fc26079b9a1be09865ea270b (diff)
downloadbcm5719-llvm-ceb71e887b8ed25594740ab7ac9419baf1e3c1e0.tar.gz
bcm5719-llvm-ceb71e887b8ed25594740ab7ac9419baf1e3c1e0.zip
[Windows] Separate elements in -print-search-dirs with semicolons
Path lists on windows should always be separated by semicolons, not colons. Reuse llvm::sys::EnvPathSeparator for this purpose (as that's also a path list that is separated in the same way). Alternatively, this could just be a local ifdef _WIN32 in this function, or generalizing the existing EnvPathSeparator to e.g. a llvm::sys::path::PathListSeparator? Differential Revision: https://reviews.llvm.org/D61121 llvm-svn: 359233
-rw-r--r--clang/lib/Driver/Driver.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/Driver/Driver.cpp b/clang/lib/Driver/Driver.cpp
index 1e07e70cc45..238315e8b93 100644
--- a/clang/lib/Driver/Driver.cpp
+++ b/clang/lib/Driver/Driver.cpp
@@ -1695,7 +1695,7 @@ bool Driver::HandleImmediateArgs(const Compilation &C) {
bool separator = false;
for (const std::string &Path : TC.getProgramPaths()) {
if (separator)
- llvm::outs() << ':';
+ llvm::outs() << llvm::sys::EnvPathSeparator;
llvm::outs() << Path;
separator = true;
}
@@ -1706,7 +1706,7 @@ bool Driver::HandleImmediateArgs(const Compilation &C) {
for (const std::string &Path : TC.getFilePaths()) {
// Always print a separator. ResourceDir was the first item shown.
- llvm::outs() << ':';
+ llvm::outs() << llvm::sys::EnvPathSeparator;
// Interpretation of leading '=' is needed only for NetBSD.
if (Path[0] == '=')
llvm::outs() << sysroot << Path.substr(1);
OpenPOWER on IntegriCloud