aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Basic/Targets/WebAssembly.h
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/Basic/Targets/WebAssembly.h')
-rw-r--r--clang/lib/Basic/Targets/WebAssembly.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/clang/lib/Basic/Targets/WebAssembly.h b/clang/lib/Basic/Targets/WebAssembly.h
index 9665156b143f..77a2fe9ae117 100644
--- a/clang/lib/Basic/Targets/WebAssembly.h
+++ b/clang/lib/Basic/Targets/WebAssembly.h
@@ -38,6 +38,9 @@ class LLVM_LIBRARY_VISIBILITY WebAssemblyTargetInfo : public TargetInfo {
bool HasMutableGlobals = false;
bool HasMultivalue = false;
bool HasTailCall = false;
+ bool HasReferenceTypes = false;
+
+ std::string ABI;
public:
explicit WebAssemblyTargetInfo(const llvm::Triple &T, const TargetOptions &)
@@ -58,6 +61,9 @@ public:
IntPtrType = SignedLong;
}
+ StringRef getABI() const override;
+ bool setABI(const std::string &Name) override;
+
protected:
void getTargetDefines(const LangOptions &Opts,
MacroBuilder &Builder) const override;
@@ -114,7 +120,22 @@ private:
? (IsSigned ? SignedLongLong : UnsignedLongLong)
: TargetInfo::getLeastIntTypeByWidth(BitWidth, IsSigned);
}
+
+ CallingConvCheckResult checkCallingConvention(CallingConv CC) const override {
+ switch (CC) {
+ case CC_C:
+ case CC_Swift:
+ return CCCR_OK;
+ default:
+ return CCCR_Warning;
+ }
+ }
+
+ bool hasExtIntType() const override { return true; }
+
+ bool hasProtectedVisibility() const override { return false; }
};
+
class LLVM_LIBRARY_VISIBILITY WebAssembly32TargetInfo
: public WebAssemblyTargetInfo {
public: