aboutsummaryrefslogtreecommitdiff
path: root/lib/Lex
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-01-16 19:01:46 +0000
committerChris Lattner <sabre@nondot.org>2009-01-16 19:01:46 +0000
commit172e336b12fa32a1737f66d77a3f2de86f9cc8e8 (patch)
tree11ca68393aea876ce2f91d32be99201c4b997795 /lib/Lex
parenta9d9145741ef77db45890911674705b81605b10b (diff)
only notify callbacks if they exist.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62334 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Lex')
-rw-r--r--lib/Lex/Pragma.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Lex/Pragma.cpp b/lib/Lex/Pragma.cpp
index 6087774353..667e4361a8 100644
--- a/lib/Lex/Pragma.cpp
+++ b/lib/Lex/Pragma.cpp
@@ -400,7 +400,8 @@ void Preprocessor::HandlePragmaComment(Token &Tok) {
}
// If the pragma is lexically sound, notify any interested PPCallbacks.
- Callbacks->PragmaComment(CommentLoc, II, ArgumentString);
+ if (Callbacks)
+ Callbacks->PragmaComment(CommentLoc, II, ArgumentString);
}