[Lldb-commits] [lldb] [lldb] Download to a unique temporary path in the SymStore locator (PR #214632)

Charles Zablit via lldb-commits lldb-commits at lists.llvm.org
Fri Aug 7 01:09:03 PDT 2026


================
@@ -299,25 +309,29 @@ RequestFileFromSymStoreServerHTTP(llvm::StringRef base_url, llvm::StringRef key,
     Debugger::ReportWarning(
         llvm::formatv("failed to download from SymStore '{0}': {1}", source_url,
                       llvm::toString(std::move(Err))));
+    fs::remove(tmp_file);
     return {};
   }
   if (llvm::Error Err = Handler.commit()) {
     Debugger::ReportWarning(
         llvm::formatv("failed to download from SymStore '{0}': {1}", source_url,
                       llvm::toString(std::move(Err))));
+    fs::remove(tmp_file);
----------------
charles-zablit wrote:

Could we move this into an `llvm::scope_exit` closure instead of copying it before every return? Of course we don't want to do this in case of a `200` response code so this might end up more complex than manually calling `fs::remove`.

https://github.com/llvm/llvm-project/pull/214632


More information about the lldb-commits mailing list