================ @@ -1103,7 +1103,15 @@ static void InitializePredefinedMacros(const TargetInfo &TI, assert(TI.getCharWidth() == 8 && "Only support 8-bit char so far"); Builder.defineMacro("__CHAR_BIT__", Twine(TI.getCharWidth())); - Builder.defineMacro("__BOOL_WIDTH__", Twine(TI.getBoolWidth())); + // The macro is specifying the number of bits in the value representation, + // not the number of bits in the object representation, which is what + // getBoolWidth() will return. For the bool/_Bool data type, there is only ---------------- jrtc27 wrote:
Hm, I guess in an ideal world we'd have getTypeObjectWidth and getTypeValueWidth to avoid assuming they're the same or, in this case, hard-coding 1, but if this is the only case where we need anything different from what we have today then that would be a bit overkill. https://github.com/llvm/llvm-project/pull/117364 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits