================
@@ -788,16 +789,28 @@ class LLVM_LIBRARY_VISIBILITY ZOSTargetInfo : public 
OSTargetInfo<Target> {
 // UEFI target
 template <typename Target>
 class LLVM_LIBRARY_VISIBILITY UEFITargetInfo : public OSTargetInfo<Target> {
+  llvm::Triple Triple;
 protected:
   void getOSDefines(const LangOptions &Opts, const llvm::Triple &Triple,
-                    MacroBuilder &Builder) const override {}
+                    MacroBuilder &Builder) const override {
+    DefineStd(Builder, "uefi", Opts);
+  }
 
 public:
   UEFITargetInfo(const llvm::Triple &Triple, const TargetOptions &Opts)
-      : OSTargetInfo<Target>(Triple, Opts) {
+      : OSTargetInfo<Target>(Triple, Opts), Triple(Triple) {
     this->WCharType = TargetInfo::UnsignedShort;
     this->WIntType = TargetInfo::UnsignedShort;
   }
+
+  TargetInfo::CallingConvKind
+  getCallingConvKind(bool ClangABICompat4) const override {
+    if (Triple.getArch() == llvm::Triple::x86_64) {
+      return TargetInfo::CallingConvKind::CCK_MicrosoftWin64;
+    }
----------------
jhuber6 wrote:

nit. style
```suggestion
    if (Triple.getArch() == llvm::Triple::x86_64)
      return TargetInfo::CallingConvKind::CCK_MicrosoftWin64;
```

https://github.com/llvm/llvm-project/pull/120632
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to