https://github.com/ianayl updated 
https://github.com/llvm/llvm-project/pull/211607

>From a2fad177580e66e74714edc8d4f033cff77b103d Mon Sep 17 00:00:00 2001
From: "Li, Ian" <[email protected]>
Date: Wed, 22 Jul 2026 12:36:43 -0700
Subject: [PATCH] Return error if CompilerInstance target creation failed

---
 clang/lib/Tooling/DependencyScanningTool.cpp | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/clang/lib/Tooling/DependencyScanningTool.cpp 
b/clang/lib/Tooling/DependencyScanningTool.cpp
index b435e42af28b4..4072244f33fc3 100644
--- a/clang/lib/Tooling/DependencyScanningTool.cpp
+++ b/clang/lib/Tooling/DependencyScanningTool.cpp
@@ -500,9 +500,7 @@ bool CompilerInstanceWithContext::initialize(
   // once here, and the information is reused for all computeDependencies 
calls.
   // We do not need to call createTarget explicitly if we go through
   // CompilerInstance::ExecuteAction to perform scanning.
-  CI.createTarget();
-
-  return true;
+  return CI.createTarget();
 }
 
 bool CompilerInstanceWithContext::computeDependencies(

_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to