[llvm] Replace missing file check with DCHECK().
The existing of the LLVM files is a pre-requisite of running the
compiler service, so downgrade their checks to debug-only
conditionals.
@@ -72,12 +72,8 @@ Status getTextSizeInBytes(llvm::Module& module, int64_t* value, const fs::path&
#endif
const auto clangPath = util::getSiteDataPath("llvm/10.0.0/bin/clang");
const auto llvmSizePath = util::getSiteDataPath("llvm/10.0.0/bin/llvm-size");
- if (!fs::exists(clangPath)) {
- return Status(StatusCode::INTERNAL, fmt::format("File not found: {}", clangPath.string()));
- }
- if (!fs::exists(llvmSizePath)) {
- return Status(StatusCode::INTERNAL, fmt::format("File not found: {}", llvmSizePath.string()));
- }
+ DCHECK(fs::exists(clangPath)) << fmt::format("File not found: {}", clangPath.string());
+ DCHECK(fs::exists(llvmSizePath)) << fmt::format("File not found: {}", llvmSizePath.string());
// Lower the module to an object file using clang and extract the .text
// section size using llvm-size.
