| ... | @@ -338,7 +338,15 @@ static int ExecuteCC1Tool(SmallVectorImpl<const char *> &ArgV) { | ... | @@ -338,7 +338,15 @@ static int ExecuteCC1Tool(SmallVectorImpl<const char *> &ArgV) { |
| 338 | extern "C" int ZigClang_main(int argc_, const char **argv_); | 338 | extern "C" int ZigClang_main(int argc_, const char **argv_); |
| 339 | int ZigClang_main(int argc_, const char **argv_) { | 339 | int ZigClang_main(int argc_, const char **argv_) { |
| 340 | noteBottomOfStack(); | 340 | noteBottomOfStack(); |
| 341 | llvm::InitLLVM X(argc_, argv_); | 341 | |
| | 342 | // ZIG MOD: On windows, InitLLVM calls GetCommandLineW(), |
| | 343 | // and overwrites the args. We don't want it to do that, |
| | 344 | // and we also don't need the signal handlers it installs |
| | 345 | // (we have our own already), so we just use llvm_shutdown_obj |
| | 346 | // instead. |
| | 347 | // llvm::InitLLVM X(argc_, argv_); |
| | 348 | llvm::llvm_shutdown_obj X; |
| | 349 | |
| 342 | llvm::setBugReportMsg("PLEASE submit a bug report to " BUG_REPORT_URL | 350 | llvm::setBugReportMsg("PLEASE submit a bug report to " BUG_REPORT_URL |
| 343 | " and include the crash backtrace, preprocessed " | 351 | " and include the crash backtrace, preprocessed " |
| 344 | "source, and associated run script.\n"); | 352 | "source, and associated run script.\n"); |