Several systems failed to compile the array allocation of the TokenArray.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@219590
91177308-0d34-0410-b5e6-
96231b3b80d8
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();