[libc++] Avoids self references in transitive include test.
The output of --trace-includes starts with the header whose includes are being processed. Since the sanitize script processed all lines this include was added to the list of transitive includes. This looks odd since it implies all headers have a cyclic dependency on themselves. This change removes this self-include. Instead of just dropping the first line extract that header and use it to guard against cyclic dependencies in the header itself. The regex used has a small improvement; don't capture groups that aren't extracted. Depends on D132284 Reviewed By: ldionne, #libc Differential Revision: https://reviews.llvm.org/D132787
Loading
Please sign in to comment