aboutsummaryrefslogtreecommitdiff
path: root/include/clang/Lex/Preprocessor.h
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2009-05-03 10:04:17 +0000
committerDaniel Dunbar <daniel@zuster.org>2009-05-03 10:04:17 +0000
commite5393fb93eb879d9ebbef102ae9311fa77e023cc (patch)
tree09c13d23b4dbb4efbd42c66730f19821154559d1 /include/clang/Lex/Preprocessor.h
parent0a70c64b090ea8b34db1b2764a46f9c364193a7a (diff)
PR4063, with feeling: Chain PP callbacks by default.
- This is somewhat cleaner and also fixes PR4063 for real, I had the order wrong so we were just creating an empty dependency file. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70687 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Lex/Preprocessor.h')
-rw-r--r--include/clang/Lex/Preprocessor.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/clang/Lex/Preprocessor.h b/include/clang/Lex/Preprocessor.h
index 2184acf0e3..5b9959c32a 100644
--- a/include/clang/Lex/Preprocessor.h
+++ b/include/clang/Lex/Preprocessor.h
@@ -241,7 +241,8 @@ public:
/// it.
PPCallbacks *getPPCallbacks() const { return Callbacks; }
void setPPCallbacks(PPCallbacks *C) {
- delete Callbacks;
+ if (Callbacks)
+ C = new PPChainedCallbacks(C, Callbacks);
Callbacks = C;
}