add a new PP_MACRO_NAME hack so that I can test object-like macros.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68803 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Frontend/PCHWriter.cpp b/lib/Frontend/PCHWriter.cpp
index 255ce8b..6f4492b 100644
--- a/lib/Frontend/PCHWriter.cpp
+++ b/lib/Frontend/PCHWriter.cpp
@@ -505,6 +505,13 @@
IdentifierInfo *II = I->first;
+ // FIXME: Emit a PP_MACRO_NAME for testing. This should be removed when we
+ // have identifierinfo id's.
+ for (unsigned i = 0, e = II->getLength(); i != e; ++i)
+ Record.push_back(II->getName()[i]);
+ S.EmitRecord(pch::PP_MACRO_NAME, Record);
+ Record.clear();
+
// FIXME: Output the identifier Info ID #!
Record.push_back((intptr_t)II);
Record.push_back(MI->getDefinitionLoc().getRawEncoding());