╭─────────────╮ │scroll to top│ ╰─────────────╯ ╭ zig_clang_cc1_main.cpp ───────────────────────────────────────╮ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ╰───────────────────────────────────────────────────────────────╯
╭ find file ─ ─ ─ ─ ─ ─ ─ ─ ─ ─╮ ╭────╮ ╭ clone ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ╮ │ │ │http│ ssh │ │ ╰ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─╯ ╰────╯ ╰ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ╯
305 } 306 307 // If any timers were active but haven't been destroyed yet, print their 308 // results now. This happens in -disable-free mode. 309 { 310 // This isn't a formal input or output of the compiler. 311 auto BypassSandbox = llvm::sys::sandbox::scopedDisable(); 312 std::unique_ptr<raw_ostream> IOFile = llvm::CreateInfoOutputFile(); 313 if (Clang->getCodeGenOpts().TimePassesJson) { 314 *IOFile << "{\n"; 315 llvm::TimerGroup::printAllJSONValues(*IOFile, ""); 316 *IOFile << "\n}\n"; 317 } else if (!Clang->getCodeGenOpts().TimePassesStatsFile) { 318 llvm::TimerGroup::printAll(*IOFile); 319 } 320 llvm::TimerGroup::clearAll(); 321 } 322 323 if (llvm::timeTraceProfilerEnabled()) { 324 if (auto profilerOutput = Clang->createOutputFile( 325 Clang->getFrontendOpts().TimeTracePath, /*Binary=*/false, 326 /*RemoveFileOnSignal=*/false, 327 /*useTemporary=*/false)) { 328 llvm::timeTraceProfilerWrite(*profilerOutput); 329 profilerOutput.reset(); 330 llvm::timeTraceProfilerCleanup(); 331 Clang->clearOutputFiles(false); 332 } 333 } 334 335 // Our error handler depends on the Diagnostics object, which we're 336 // potentially about to delete. Uninstall the handler now so that any 337 // later errors use the default handling behavior instead. 338 llvm::remove_fatal_error_handler(); 339 340 // When running with -disable-free, don't do any destruction or shutdown. 341 if (Clang->getFrontendOpts().DisableFree) { 342 llvm::BuryPointer(std::move(Clang)); 343 return !Success; 344 } 345 346 return !Success; 347 } 348