[PATCH] D22638: Module: add debug_type to dump debugging messages related to modules being out of date

Vassil Vassilev via cfe-commits cfe-commits at lists.llvm.org
Tue Oct 18 04:48:12 PDT 2016


v.g.vassilev added a comment.

I am not sure whether that's useful for debugging out-of-date issues but this is what I use and it is helpful.

Some debugging aids (suggested by Richard Smith):

  -fdiagnostics-show-note-include-stack will tell you which module a note comes from
  #pragma clang __debug dump X allows you to produce an AST dump from within a source file, so you can see which modules declare a given name
  #pragma clang __debug macro M allows you to dump a macro, which can be useful to see which module(s) export visible include guards for a header

If a name is not visible in a modules build but is visible in a non-modules build, i usually find that's due to one of two things

  some part of the machinery that provides it depends on macro definitions leaking into a modular header from outside, or
  there is an include cycle involving a modular header and a non-modular header


https://reviews.llvm.org/D22638





More information about the cfe-commits mailing list