summaryrefslogtreecommitdiffstats
path: root/clang/Lex/PPExpressions.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2006-07-04 17:42:08 +0000
committerChris Lattner <sabre@nondot.org>2006-07-04 17:42:08 +0000
commita8654ca2cf9e455feac1157cbee13f4e19022fbd (patch)
tree8d1b34c53ebd28f06d5f02f86fbdfcbfe9655eec /clang/Lex/PPExpressions.cpp
parent1f62777508316040195df2946fdd7349f220e0e2 (diff)
downloadbcm5719-llvm-a8654ca2cf9e455feac1157cbee13f4e19022fbd.tar.gz
bcm5719-llvm-a8654ca2cf9e455feac1157cbee13f4e19022fbd.zip
Eliminate MultipleIncludeOpt::ReadDirective and all calls to it. Any directives
that are lexed are made up of tokens, so the calls are just ugly and redundant. Hook up the MIOpt for the #if case. PPCExpressions doesn't currently implement the hook though, so we still don't handle #if !defined(X) with the MIOpt. llvm-svn: 38649
Diffstat (limited to 'clang/Lex/PPExpressions.cpp')
-rw-r--r--clang/Lex/PPExpressions.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/clang/Lex/PPExpressions.cpp b/clang/Lex/PPExpressions.cpp
index 2b4afa900e5..979cb171106 100644
--- a/clang/Lex/PPExpressions.cpp
+++ b/clang/Lex/PPExpressions.cpp
@@ -26,12 +26,10 @@ using namespace llvm;
using namespace clang;
/// EvaluateDirectiveExpression - Evaluate an integer constant expression that
-/// may occur after a #if or #elif directive. Sets Result to the result of
-/// the expression. Returns false normally, true if lexing must be aborted.
-///
-/// MinPrec is the minimum precedence that this range of the expression is
-/// allowed to include.
-bool Preprocessor::EvaluateDirectiveExpression() {
+/// may occur after a #if or #elif directive. If the
+/// expression is equivalent to "!defined(X)" return X in IfNDefMacro.
+bool Preprocessor::
+EvaluateDirectiveExpression(IdentifierTokenInfo *&IfNDefMacro) {
// Peek ahead one token.
LexerToken Tok;
Lex(Tok);
OpenPOWER on IntegriCloud