File tree 1 file changed +2
-2
lines changed
1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -168,13 +168,13 @@ std::vector<llvm::DenseSet<SymbolID>> followSets(const Grammar &G) {
168
168
169
169
static llvm::ArrayRef<std::string> getTerminalNames () {
170
170
static const auto &TerminalNames = []() {
171
- auto & TerminalNames = * new std::array<std:: string, NumTerminals> ;
171
+ auto TerminalNames = new std::string[ NumTerminals] ;
172
172
#define PUNCTUATOR (Tok, Spelling ) TerminalNames[tok::Tok] = Spelling;
173
173
#define KEYWORD (Keyword, Condition ) \
174
174
TerminalNames[tok::kw_##Keyword] = llvm::StringRef (#Keyword).upper ();
175
175
#define TOK (Tok ) TerminalNames[tok::Tok] = llvm::StringRef(#Tok).upper();
176
176
#include " clang/Basic/TokenKinds.def"
177
- return TerminalNames;
177
+ return llvm::makeArrayRef ( TerminalNames, NumTerminals) ;
178
178
}();
179
179
return TerminalNames;
180
180
}
You can’t perform that action at this time.
0 commit comments