Lines Matching refs:Result
48 MacroArgs *Result; in create() local
51 Result = (MacroArgs*)malloc(sizeof(MacroArgs) + in create()
54 new (Result) MacroArgs(UnexpArgTokens.size(), VarargsElided); in create()
56 Result = *ResultEnt; in create()
58 *ResultEnt = Result->ArgCache; in create()
59 Result->NumUnexpArgTokens = UnexpArgTokens.size(); in create()
60 Result->VarargsElided = VarargsElided; in create()
66 const_cast<Token*>(Result->getUnexpArgument(0))); in create()
68 return Result; in create()
117 const Token *Result = Start; in getUnexpArgument() local
119 for (; Arg; ++Result) { in getUnexpArgument()
120 assert(Result < Start+NumUnexpArgTokens && "Invalid arg #"); in getUnexpArgument()
121 if (Result->is(tok::eof)) in getUnexpArgument()
124 assert(Result < Start+NumUnexpArgTokens && "Invalid arg #"); in getUnexpArgument()
125 return Result; in getUnexpArgument()
156 std::vector<Token> &Result = PreExpArgTokens[Arg]; in getPreExpArgument() local
157 if (!Result.empty()) return Result; in getPreExpArgument()
173 Result.push_back(Token()); in getPreExpArgument()
174 Token &Tok = Result.back(); in getPreExpArgument()
176 } while (Result.back().isNot(tok::eof)); in getPreExpArgument()
186 return Result; in getPreExpArgument()
206 SmallString<128> Result; in StringifyArgument() local
207 Result += "\""; in StringifyArgument()
213 Result += ' '; in StringifyArgument()
227 Result.append(Str.begin(), Str.end()); in StringifyArgument()
234 unsigned CurStrLen = Result.size(); in StringifyArgument()
235 Result.resize(CurStrLen+Tok.getLength()); in StringifyArgument()
236 const char *BufPtr = &Result[CurStrLen]; in StringifyArgument()
243 if (BufPtr != &Result[CurStrLen]) in StringifyArgument()
244 memcpy(&Result[CurStrLen], BufPtr, ActualTokLen); in StringifyArgument()
248 Result.resize(CurStrLen+ActualTokLen); in StringifyArgument()
255 if (Result.back() == '\\') { in StringifyArgument()
258 unsigned FirstNonSlash = Result.size()-2; in StringifyArgument()
260 while (Result[FirstNonSlash] == '\\') in StringifyArgument()
262 if ((Result.size()-1-FirstNonSlash) & 1) { in StringifyArgument()
265 Result.pop_back(); // remove one of the \'s. in StringifyArgument()
268 Result += '"'; in StringifyArgument()
274 Result[0] = '\''; in StringifyArgument()
275 Result[Result.size()-1] = '\''; in StringifyArgument()
279 if (Result.size() == 3) in StringifyArgument()
280 isBad = Result[1] == '\''; // ''' is not legal. '\' already fixed above. in StringifyArgument()
282 isBad = (Result.size() != 4 || Result[1] != '\\'); // Not '\x' in StringifyArgument()
286 Result = "' '"; // Use something arbitrary, but legal. in StringifyArgument()
290 PP.CreateString(Result, Tok, in StringifyArgument()