diff options
author | David Green <david.green@arm.com> | 2018-12-07 12:10:23 +0000 |
---|---|---|
committer | David Green <david.green@arm.com> | 2018-12-07 12:10:23 +0000 |
commit | ca29c271d2b951b125b7f97264ca7b927db0b1cf (patch) | |
tree | 0c576a9c69d06179da070a855a87d460b62e4003 /llvm/lib/Target/WebAssembly/WebAssemblyTargetMachine.cpp | |
parent | 700a29a153039c6176efaf7a3b7c0a274b8aafed (diff) | |
download | llvm-ca29c271d2b951b125b7f97264ca7b927db0b1cf.zip llvm-ca29c271d2b951b125b7f97264ca7b927db0b1cf.tar.gz llvm-ca29c271d2b951b125b7f97264ca7b927db0b1cf.tar.bz2 |
[Targets] Add errors for tiny and kernel codemodel on targets that don't support them
Adds fatal errors for any target that does not support the Tiny or Kernel
codemodels by rejigging the getEffectiveCodeModel calls.
Differential Revision: https://reviews.llvm.org/D50141
llvm-svn: 348585
Diffstat (limited to 'llvm/lib/Target/WebAssembly/WebAssemblyTargetMachine.cpp')
-rw-r--r-- | llvm/lib/Target/WebAssembly/WebAssemblyTargetMachine.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Target/WebAssembly/WebAssemblyTargetMachine.cpp b/llvm/lib/Target/WebAssembly/WebAssemblyTargetMachine.cpp index c28cfde..a6fb782 100644 --- a/llvm/lib/Target/WebAssembly/WebAssemblyTargetMachine.cpp +++ b/llvm/lib/Target/WebAssembly/WebAssemblyTargetMachine.cpp @@ -101,7 +101,7 @@ WebAssemblyTargetMachine::WebAssemblyTargetMachine( TT.isArch64Bit() ? "e-m:e-p:64:64-i64:64-n32:64-S128" : "e-m:e-p:32:32-i64:64-n32:64-S128", TT, CPU, FS, Options, getEffectiveRelocModel(RM), - CM ? *CM : CodeModel::Large, OL), + getEffectiveCodeModel(CM, CodeModel::Large), OL), TLOF(new WebAssemblyTargetObjectFile()) { // WebAssembly type-checks instructions, but a noreturn function with a return // type that doesn't match the context will cause a check failure. So we lower |