╭─────────────╮ │scroll to top│ ╰─────────────╯ ╭ zig_clang_driver.cpp ─────────────────────────────────────────╮ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ╰───────────────────────────────────────────────────────────────╯
╭ find file ─ ─ ─ ─ ─ ─ ─ ─ ─ ─╮ ╭────╮ ╭ clone ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ╮ │ │ │http│ ssh │ │ ╰ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─╯ ╰────╯ ╰ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ╯
441 if (::getenv("FORCE_CLANG_DIAGNOSTICS_CRASH")) 442 llvm::dbgs() << llvm::getBugReportMsg(); 443 if (FailingCommand != nullptr && 444 TheDriver.maybeGenerateCompilationDiagnostics(CommandStatus, ReproLevel, 445 *C, *FailingCommand)) 446 Res = 1; 447 448 Diags.getClient()->finish(); 449 450 if (!UseNewCC1Process && IsCrash) { 451 // When crashing in -fintegrated-cc1 mode, bury the timer pointers, because 452 // the internal linked list might point to already released stack frames. 453 llvm::BuryPointer(llvm::TimerGroup::acquireTimerGlobals()); 454 } else { 455 // If any timers were active but haven't been destroyed yet, print their 456 // results now. This happens in -disable-free mode. 457 llvm::TimerGroup::printAll(llvm::errs()); 458 llvm::TimerGroup::clearAll(); 459 } 460 461 #ifdef _WIN32 462 // Exit status should not be negative on Win32, unless abnormal termination. 463 // Once abnormal termination was caught, negative status should not be 464 // propagated. 465 if (Res < 0) 466 Res = 1; 467 #endif 468 469 // If we have multiple failing commands, we return the result of the first 470 // failing command. 471 return Res; 472 } 473 474 extern "C" int ZigClang_main(int, char **); 475 int ZigClang_main(int argc, char **argv) { 476 return clang_main(argc, argv, {argv[0], nullptr, false}); 477 } 478