================
@@ -790,7 +790,9 @@ template <typename Target>
 class LLVM_LIBRARY_VISIBILITY UEFITargetInfo : public OSTargetInfo<Target> {
 protected:
   void getOSDefines(const LangOptions &Opts, const llvm::Triple &Triple,
-                    MacroBuilder &Builder) const override {}
+                    MacroBuilder &Builder) const override {
+    Builder.defineMacro("__UEFI__");
----------------
petrhosek wrote:

`DefineStd` will define `uefi` (in the GNU mode), `__uefi` and `__uefi__`. I 
don't think we should be defining any new symbols in the user's namespace, even 
in the GNU mode. I also don't think we should have more then one define, we do 
it in other targets for backwards compatibility, but there is no backwards 
compatibility for UEFI. Regarding upper case vs lower case, I have mild 
preference for the upper case since it's more consistent with Windows and UEFI 
is essentially a flavor of Windows, not UNIX or GNU. TL;DR I'd prefer using 
`Builder.defineMacro("__UEFI__");` as you had originally.

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