diff options
Diffstat (limited to 'contrib/llvm-project/llvm/lib/LTO/LTOModule.cpp')
-rw-r--r-- | contrib/llvm-project/llvm/lib/LTO/LTOModule.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/contrib/llvm-project/llvm/lib/LTO/LTOModule.cpp b/contrib/llvm-project/llvm/lib/LTO/LTOModule.cpp index ebe779aea62e..1119622578df 100644 --- a/contrib/llvm-project/llvm/lib/LTO/LTOModule.cpp +++ b/contrib/llvm-project/llvm/lib/LTO/LTOModule.cpp @@ -46,6 +46,7 @@ using namespace llvm::object; LTOModule::LTOModule(std::unique_ptr<Module> M, MemoryBufferRef MBRef, llvm::TargetMachine *TM) : Mod(std::move(M)), MBRef(MBRef), _target(TM) { + assert(_target && "target machine is null"); SymTab.addModule(Mod.get()); } @@ -221,6 +222,8 @@ LTOModule::makeLTOModule(MemoryBufferRef Buffer, const TargetOptions &options, CPU = "core2"; else if (Triple.getArch() == llvm::Triple::x86) CPU = "yonah"; + else if (Triple.isArm64e()) + CPU = "apple-a12"; else if (Triple.getArch() == llvm::Triple::aarch64 || Triple.getArch() == llvm::Triple::aarch64_32) CPU = "cyclone"; |