Fixed a problem in r19589.

Several systems failed to compile the array allocation of the TokenArray.

llvm-svn: 219590
This commit is contained in:
Tyler Nowicki 2014-10-12 21:28:02 +00:00
parent c724a83e20
commit 6a0354af46
1 changed files with 2 additions and 2 deletions

View File

@ -1877,8 +1877,8 @@ static bool ParseLoopHintValue(Preprocessor &PP, Token &Tok, Token PragmaName,
EOFTok.setLocation(Tok.getLocation());
ValueList.push_back(EOFTok); // Terminates expression for parsing.
Token *TokenArray =
new (PP.getPreprocessorAllocator()) Token[ValueList.size()];
Token *TokenArray = (Token *)PP.getPreprocessorAllocator().Allocate(
ValueList.size() * sizeof(Token), llvm::alignOf<Token>());
std::copy(ValueList.begin(), ValueList.end(), TokenArray);
Info.Toks = TokenArray;
Info.TokSize = ValueList.size();