forked from OSchip/llvm-project
Fixed a problem in r19589.
Several systems failed to compile the array allocation of the TokenArray. llvm-svn: 219590
This commit is contained in:
parent
c724a83e20
commit
6a0354af46
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue