summaryrefslogtreecommitdiffstats
path: root/clang/lib/Frontend/ASTUnit.cpp
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2009-11-11 05:29:04 +0000
committerDaniel Dunbar <daniel@zuster.org>2009-11-11 05:29:04 +0000
commit000c4ffd161c0726df06d0e1d7894a6b84a86f05 (patch)
treefaa05bb64d1193fd39ba4d382b9a5d7c11336b16 /clang/lib/Frontend/ASTUnit.cpp
parent499baed8a86759f40d820a3897c98a8a58b515e7 (diff)
downloadbcm5719-llvm-000c4ffd161c0726df06d0e1d7894a6b84a86f05.tar.gz
bcm5719-llvm-000c4ffd161c0726df06d0e1d7894a6b84a86f05.zip
Redo how PCH handles its implicit include. Instead of treating this specially in
the front-end (as far as the preprocessor goes), follow the usual logic of inserting the (original include path) name into the predefines buffer. This pushes the responsibility for handling this to PCH instead of the front-end. In PCH this requires being a little more clever when we diff the predefines buffers. Neither of these solutions are particularly great, I think what we eventually should do is something like gcc where we insert a special marker to indicate the PCH file, but then run the preprocessor as usual. This would be clearer and would allow us to drop the overly clever predefines handling. llvm-svn: 86806
Diffstat (limited to 'clang/lib/Frontend/ASTUnit.cpp')
-rw-r--r--clang/lib/Frontend/ASTUnit.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/clang/lib/Frontend/ASTUnit.cpp b/clang/lib/Frontend/ASTUnit.cpp
index b5e65589e32..82786aaa7fd 100644
--- a/clang/lib/Frontend/ASTUnit.cpp
+++ b/clang/lib/Frontend/ASTUnit.cpp
@@ -68,6 +68,7 @@ public:
virtual bool ReadPredefinesBuffer(llvm::StringRef PCHPredef,
FileID PCHBufferID,
+ llvm::StringRef OriginalFileName,
std::string &SuggestedPredefines) {
Predefines = PCHPredef;
return false;
OpenPOWER on IntegriCloud