================
@@ -1175,13 +1175,15 @@ static void InitializePredefinedMacros(const TargetInfo 
&TI,
   Builder.defineMacro("__UINTMAX_C_SUFFIX__", ConstSuffix);
   Builder.defineMacro("__UINTMAX_C(c)",
                       ConstSuffix.size() ? Twine("c##") + ConstSuffix : "c");
-  DefineType("__PTRDIFF_TYPE__", TI.getPtrDiffType(LangAS::Default), Builder);
-  DefineFmt(LangOpts, "__PTRDIFF", TI.getPtrDiffType(LangAS::Default), TI,
-            Builder);
   DefineType("__INTPTR_TYPE__", TI.getIntPtrType(), Builder);
   DefineFmt(LangOpts, "__INTPTR", TI.getIntPtrType(), TI, Builder);
-  DefineType("__SIZE_TYPE__", TI.getSizeType(), Builder);
+  // Use deduction to obtain the built-in __size_t and __ptrdiff_t types 
instead
+  // of standard integer types
+  Builder.defineMacro("__SIZE_TYPE__", "__typeof(sizeof(0))");
----------------
erichkeane wrote:

I don't have a good hold on whether this is a good idea or not.  We should 
probably have an RFC for this.

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

Reply via email to