mstorsjo added inline comments.
================ Comment at: lib/Driver/ToolChains/MinGW.cpp:122-131 if (TC.getArch() == llvm::Triple::x86) CmdArgs.push_back("i386pe"); - if (TC.getArch() == llvm::Triple::x86_64) + else if (TC.getArch() == llvm::Triple::x86_64) CmdArgs.push_back("i386pep"); - if (TC.getArch() == llvm::Triple::arm) + else if (TC.getArch() == llvm::Triple::arm) CmdArgs.push_back("thumb2pe"); + else if (TC.getArch() == llvm::Triple::aarch64) ---------------- compnerd wrote: > Can you use a switch here instead? Sure, I can change that. What do you think about the `llvm_unreachable` part btw? There's nothing stopping a user from trigger that with e.g. `-target mips-windows-gnu`, and in release builds, such a `default: llvm_unreachable()` case usually ends up as just running one of the existing cases. Should it be changed into a real runtime error that isn't optimized out from release builds? https://reviews.llvm.org/D36364 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits