[HIPIFY] [Fix] An argument of a function used as macro argument is not hipified.

https://github.com/GPUOpen-ProfessionalCompute-Tools/HIP/issues/35


[ROCm/hip commit: 5ec0488ce8]
此提交包含在:
Evgeny Mankov
2016-12-27 18:54:02 +03:00
父節點 154576f772
當前提交 12bf2e3f73
-7
查看文件
@@ -1671,8 +1671,6 @@ public:
const MacroDefinition &MD, SourceRange Range,
const MacroArgs *Args) override {
if (_sm->isWrittenInMainFile(MacroNameTok.getLocation())) {
StringRef macroName = MacroNameTok.getIdentifierInfo()->getName();
if (N.cudaExcludes.end() == N.cudaExcludes.find(macroName)) {
for (unsigned int i = 0; Args && i < MD.getMacroInfo()->getNumArgs(); i++) {
std::vector<Token> toks;
// Code below is a kind of stolen from 'MacroArgs::getPreExpArgument'
@@ -1684,16 +1682,13 @@ public:
#else
_pp->EnterTokenStream(start, len, false, false);
#endif
int j = 0;
do {
toks.push_back(Token());
Token &tk = toks.back();
_pp->Lex(tk);
j++;
} while (toks.back().isNot(tok::eof));
_pp->RemoveTopOfLexerStack();
// end of stolen code
j = 0;
for (auto tok : toks) {
if (tok.isAnyIdentifier()) {
StringRef name = tok.getIdentifierInfo()->getName();
@@ -1750,10 +1745,8 @@ public:
}
}
}
j++;
}
}
}
}
}