mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-29 03:46:07 +00:00

it, importers of B should not see the macro. This is complicated by the fact that A's macro could also be visible through a different path. The rules (as hashed out on cfe-commits) are included as a documentation update in this change. With this, the number of regressions in libc++'s testsuite when modules are enabled drops from 47 to 7. Those remaining 7 are also macro-related, and are due to remaining bugs in this change (in particular, the handling of submodules is imperfect). llvm-svn: 202560
23 lines
353 B
C
23 lines
353 B
C
#define TOP unsigned int
|
|
|
|
#define TOP_LEFT_UNDEF 1
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#define TOP_RIGHT_REDEF float
|
|
// The last definition will be exported from the sub-module.
|
|
#define TOP_RIGHT_REDEF int
|
|
|
|
#define TOP_RIGHT_UNDEF int
|
|
|
|
#define TOP_OTHER_UNDEF1 42
|
|
#undef TOP_OTHER_UNDEF2
|
|
#define TOP_OTHER_REDEF1 1
|
|
#define TOP_OTHER_REDEF2 2
|
|
|
|
#define TOP_OTHER_DEF_RIGHT_UNDEF void
|