summaryrefslogtreecommitdiffstats
path: root/lib/CodeGen/MacroPPCallbacks.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
commitfc60afa41c22bbd3cde2075d5ade4f8698e99243 (patch)
treed313291c5fb4eb3cf458bff6887e01ebe48c5b70 /lib/CodeGen/MacroPPCallbacks.cpp
parent80beb506ac01d2360fffdb66f1195720c267cb8a (diff)
[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! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@308157 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/MacroPPCallbacks.cpp')
-rw-r--r--lib/CodeGen/MacroPPCallbacks.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/CodeGen/MacroPPCallbacks.cpp b/lib/CodeGen/MacroPPCallbacks.cpp
index 6a31dfe53d..a6f21d8ddc 100644
--- a/lib/CodeGen/MacroPPCallbacks.cpp
+++ b/lib/CodeGen/MacroPPCallbacks.cpp
@@ -26,8 +26,8 @@ void MacroPPCallbacks::writeMacroDefinition(const IdentifierInfo &II,
if (MI.isFunctionLike()) {
Name << '(';
- 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) {
Name << (*AI)->getName();
Name << ',';