Details
- Reviewers
hans
Diff Detail
Event Timeline
lib/Driver/Driver.cpp | ||
---|---|---|
933 | I think Optional<> provides a bool conversion operator, so you can just do: "return llvm::sys::FindInEnvPath("LIB", Value);".. and since the function is now just one line, maybe inline it into the caller. | |
lib/Driver/Tools.cpp | ||
7556 | This doesn't work. The previous code handles the case where there are multiple cl.exe on the PATH, whereas the new code just returns the first one. This function is used in the Visual Studio clang-cl integration, where we rename clang-cl.exe to cl.exe and put it first on PATH. This function is then used to find the real cl.exe. I think we have to leave this code as it is (though we can remove the definition of PathSeparators and use llvm::sys::EnvPathSeparator). |
Good points. I'll submit a new patch once we decide where to put the function itself.
I think Optional<> provides a bool conversion operator, so you can just do: "return llvm::sys::FindInEnvPath("LIB", Value);".. and since the function is now just one line, maybe inline it into the caller.