Skip to content

Commit 60b9728

Browse files
committed
Only declare Popen in Paths.cpp for LLVM_ON_UNIX
1 parent 1bd3a61 commit 60b9728

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

lib/Interpreter/Paths.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ namespace platform {
3434
#error "Unknown platform (environmental delimiter)"
3535
#endif
3636

37+
#if defined(LLVM_ON_UNIX)
3738
bool Popen(const std::string& Cmd, llvm::SmallVectorImpl<char>& Buf, bool RdE) {
3839
if (FILE *PF = ::popen(RdE ? (Cmd + " 2>&1").c_str() : Cmd.c_str(), "r")) {
3940
Buf.resize(0);
@@ -52,6 +53,7 @@ bool Popen(const std::string& Cmd, llvm::SmallVectorImpl<char>& Buf, bool RdE) {
5253
}
5354
return false;
5455
}
56+
#endif
5557

5658
bool GetSystemLibraryPaths(llvm::SmallVectorImpl<std::string>& Paths) {
5759
#if defined(__APPLE__) || defined(__CYGWIN__)

0 commit comments

Comments
 (0)