[clang] [clang-repl] Fixing vulnerabilities with respect to orc runtime (PR #165852)
Vassil Vassilev via cfe-commits
cfe-commits at lists.llvm.org
Thu Nov 6 00:59:55 PST 2025
================
@@ -397,33 +397,48 @@ Interpreter::getOrcRuntimePath(const driver::ToolChain &TC) {
std::optional<std::string> CompilerRTPath = TC.getCompilerRTPath();
std::optional<std::string> ResourceDir = TC.getRuntimePath();
- if (!CompilerRTPath) {
- return llvm::make_error<llvm::StringError>("CompilerRT path not found",
- std::error_code());
+ if (!CompilerRTPath && !ResourceDir) {
+ return llvm::make_error<llvm::StringError>(
+ "Neither CompilerRT path nor ResourceDir path found",
+ std::error_code());
----------------
vgvassilev wrote:
I'd keep this two checks separate and returning proper errors specific to the variable.
https://github.com/llvm/llvm-project/pull/165852
More information about the cfe-commits
mailing list