forked from OSchip/llvm-project
[WebAssembly] Add an `isWasm` target triple predicate.
This simplies code which needs to apply the same logic to both wasm32 and wasm64. This patch is part of https://reviews.llvm.org/D70700.
This commit is contained in:
parent
080890a9f3
commit
c08384a3ae
|
@ -741,6 +741,11 @@ public:
|
|||
return getArch() == Triple::ve;
|
||||
}
|
||||
|
||||
/// Tests whether the target is wasm (32- and 64-bit).
|
||||
bool isWasm() const {
|
||||
return getArch() == Triple::wasm32 || getArch() == Triple::wasm64;
|
||||
}
|
||||
|
||||
/// Tests whether the target supports comdat
|
||||
bool supportsCOMDAT() const {
|
||||
return !(isOSBinFormatMachO() || isOSBinFormatXCOFF());
|
||||
|
|
Loading…
Reference in New Issue