aboutsummaryrefslogtreecommitdiff
path: root/Lex/PPExpressions.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2007-10-07 08:04:56 +0000
committerChris Lattner <sabre@nondot.org>2007-10-07 08:04:56 +0000
commit0edde55077cc3cb9fffeba19f5936f05a68c8e2b (patch)
tree1720ab38e92d73fba41b8f3195f55f6c1831e1b6 /Lex/PPExpressions.cpp
parent9c46de446d18f4a28446cb798d4131bd05515699 (diff)
change calls to getMacroInfo into hasMacroDefinition() where possible.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42726 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'Lex/PPExpressions.cpp')
-rw-r--r--Lex/PPExpressions.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/Lex/PPExpressions.cpp b/Lex/PPExpressions.cpp
index 2a18cfd610..fb745068fd 100644
--- a/Lex/PPExpressions.cpp
+++ b/Lex/PPExpressions.cpp
@@ -100,17 +100,18 @@ static bool EvaluateValue(llvm::APSInt &Result, Token &PeekTok,
}
// Otherwise, we got an identifier, is it defined to something?
- Result = II->getMacroInfo() != 0;
+ Result = II->hasMacroDefinition();
Result.setIsUnsigned(false); // Result is signed intmax_t.
// If there is a macro, mark it used.
if (Result != 0 && ValueLive) {
- II->getMacroInfo()->setIsUsed(true);
+ MacroInfo *Macro = II->getMacroInfo();
+ Macro->setIsUsed(true);
// If this is the first use of a target-specific macro, warn about it.
- if (II->getMacroInfo()->isTargetSpecific()) {
+ if (Macro->isTargetSpecific()) {
// Don't warn on second use.
- II->getMacroInfo()->setIsTargetSpecific(false);
+ Macro->setIsTargetSpecific(false);
PP.getTargetInfo().DiagnoseNonPortability(PeekTok.getLocation(),
diag::port_target_macro_use);
}