You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[Modules] Make -module-file-info print macro names in deterministic order (#161332)
Developers reported non-deterministic output from `-module-file-info`,
thinking this reflected non-determinism in the .pcm files themselves.
However, it turned out it was the printing that was non-deterministic:
```
$ cat /tmp/a.h
#define FOO 1
#define BAR 2
$ build/bin/clang -cc1 -std=c++20 -x c++ -emit-header-unit /tmp/a.h -o /tmp/a.pcm
$ build/bin/clang -cc1 -module-file-info /tmp/a.pcm | grep -A2 Definitions
Macro Definitions:
FOO
BAR
$ build/bin/clang -cc1 -module-file-info /tmp/a.pcm | grep -A2 Definitions
Macro Definitions:
BAR
FOO
```
Making the output deterministic also simplifies the test.
This is a follow-up to 360c5fe
0 commit comments