summaryrefslogtreecommitdiffstats
path: root/clang/lib/Frontend/PrintPreprocessedOutput.cpp
diff options
context:
space:
mode:
authorFaisal Vali <faisalv@yahoo.com>2017-07-17 01:27:53 +0000
committerFaisal Vali <faisalv@yahoo.com>2017-07-17 01:27:53 +0000
commit11746b05e576ca2a1f21b61721d0a13975ace751 (patch)
tree220890d29d31f5dda7c5d36fb745c114673760e2 /clang/lib/Frontend/PrintPreprocessedOutput.cpp
parent9466a84a4ef38b4c8348c5f3b4b5c639faa1d576 (diff)
downloadbcm5719-llvm-11746b05e576ca2a1f21b61721d0a13975ace751.tar.gz
bcm5719-llvm-11746b05e576ca2a1f21b61721d0a13975ace751.zip
[NFC] Refactor the Preprocessor function that handles Macro definitions and rename Arguments to Parameters in Macro Definitions.
- Extracted the reading of the tokens out into a separate function. - Replace 'Argument' with 'Parameter' when referring to the identifiers of the macro definition (as opposed to the supplied arguments - MacroArgs - during the macro invocation). This is in preparation for submitting patches for review to implement __VA_OPT__ which will otherwise just keep lengthening the HandleDefineDirective function and making it less comprehensible. Thanks! llvm-svn: 308157
Diffstat (limited to 'clang/lib/Frontend/PrintPreprocessedOutput.cpp')
-rw-r--r--clang/lib/Frontend/PrintPreprocessedOutput.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/Frontend/PrintPreprocessedOutput.cpp b/clang/lib/Frontend/PrintPreprocessedOutput.cpp
index 5336de1f746..914039ad5bb 100644
--- a/clang/lib/Frontend/PrintPreprocessedOutput.cpp
+++ b/clang/lib/Frontend/PrintPreprocessedOutput.cpp
@@ -38,8 +38,8 @@ static void PrintMacroDefinition(const IdentifierInfo &II, const MacroInfo &MI,
if (MI.isFunctionLike()) {
OS << '(';
- if (!MI.arg_empty()) {
- MacroInfo::arg_iterator AI = MI.arg_begin(), E = MI.arg_end();
+ if (!MI.param_empty()) {
+ MacroInfo::param_iterator AI = MI.param_begin(), E = MI.param_end();
for (; AI+1 != E; ++AI) {
OS << (*AI)->getName();
OS << ',';
OpenPOWER on IntegriCloud