This is essential for iterating across macros properly, which LLDB does when
loading macros from modules. A naiver version of this patch (without the
conditional) caused assertion failures in the testsuite, but this version should
be safe.
Thanks to Ben Langmuir for the refinement that made this work.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@269554
91177308-0d34-0410-b5e6-
96231b3b80d8
break;
case PP_MACRO_OBJECT_LIKE:
- case PP_MACRO_FUNCTION_LIKE:
- getLocalIdentifier(*I, Record[0]);
+ case PP_MACRO_FUNCTION_LIKE: {
+ IdentifierInfo *II = getLocalIdentifier(*I, Record[0]);
+ if (II->isOutOfDate())
+ updateOutOfDateIdentifier(*II);
break;
+ }
case PP_TOKEN:
// Ignore tokens.