summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/MacroPPCallbacks.cpp
diff options
context:
space:
mode:
authorFaisal Vali <faisalv@yahoo.com>2017-07-17 17:18:43 +0000
committerFaisal Vali <faisalv@yahoo.com>2017-07-17 17:18:43 +0000
commitac506d7494ee889fcf5c180b5d3ddec318797d9b (patch)
tree2885aa78d78aef29d1d88e859916e24ad7ce7f58 /clang/lib/CodeGen/MacroPPCallbacks.cpp
parentf6f2c6e47fe607925f5e3b849944fd7379add513 (diff)
downloadbcm5719-llvm-ac506d7494ee889fcf5c180b5d3ddec318797d9b.tar.gz
bcm5719-llvm-ac506d7494ee889fcf5c180b5d3ddec318797d9b.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. I will also directly update some extra clang tooling that is broken by the change from Argument to Parameter. Hopefully the bots will stay appeased. Thanks! llvm-svn: 308190
Diffstat (limited to 'clang/lib/CodeGen/MacroPPCallbacks.cpp')
-rw-r--r--clang/lib/CodeGen/MacroPPCallbacks.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/CodeGen/MacroPPCallbacks.cpp b/clang/lib/CodeGen/MacroPPCallbacks.cpp
index 6a31dfe53d6..a6f21d8ddcf 100644
--- a/clang/lib/CodeGen/MacroPPCallbacks.cpp
+++ b/clang/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 << ',';
OpenPOWER on IntegriCloud