[PATCH] D44093: [BUILTINS] structure pretty printer

Paul Semel via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Mar 9 09:30:56 PST 2018

paulsemel added inline comments.

Comment at: lib/CodeGen/CGBuiltin.cpp:1252
+      Types[getContext().getPointerType(getContext().CharTy)] = "%s";
+      GENERATE_TYPE_QUALIFIERS_NO_RESTRICT(getContext().CharTy, "%s")
+    }
aaron.ballman wrote:
> paulsemel wrote:
> > aaron.ballman wrote:
> > > What about other types that have format specifiers (ptrdiff_t, size_t, intptr_t, char16_t, etc)?
> > So, for typedef, why not apply the `QualType::getCanonicalType` to our field type, so that we try to get rid of those intermediate typedefs ?
> It should be possible to do for type aliases, because you know the canonical type information. However, that won't work for builtin types that aren't a typedef like `char16_t`.
Sure, but in this case, the only soluntion is to determine how we want to print those builtins and add those and the static map

  rC Clang


More information about the cfe-commits mailing list