summaryrefslogtreecommitdiffstats
path: root/clang/lib/Frontend/PCHWriter.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-04-10 18:22:18 +0000
committerChris Lattner <sabre@nondot.org>2009-04-10 18:22:18 +0000
commit2916a482fb71dab89bbec76d1fa467930eafc75b (patch)
treea82de5aad573872b32e2a2de86cdce1bb8f6ef64 /clang/lib/Frontend/PCHWriter.cpp
parentcd1e037c50105144081adc8a5621a39f212ed095 (diff)
downloadbcm5719-llvm-2916a482fb71dab89bbec76d1fa467930eafc75b.tar.gz
bcm5719-llvm-2916a482fb71dab89bbec76d1fa467930eafc75b.zip
add a new PP_MACRO_NAME hack so that I can test object-like macros.
llvm-svn: 68803
Diffstat (limited to 'clang/lib/Frontend/PCHWriter.cpp')
-rw-r--r--clang/lib/Frontend/PCHWriter.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/clang/lib/Frontend/PCHWriter.cpp b/clang/lib/Frontend/PCHWriter.cpp
index 255ce8bf8d7..6f4492bc8c1 100644
--- a/clang/lib/Frontend/PCHWriter.cpp
+++ b/clang/lib/Frontend/PCHWriter.cpp
@@ -505,6 +505,13 @@ void PCHWriter::WritePreprocessor(const Preprocessor &PP) {
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());
OpenPOWER on IntegriCloud