This change replaces container used for storing temporary
strings for generated code to std::list.
SmallVector may reallocate internal data, which will invalidate
references when more than one extended instruction set is
generated.
Reviewed By: mravishankar, antiagainst
Differential Revision: https://reviews.llvm.org/D88626
#include "llvm/TableGen/Record.h"
#include "llvm/TableGen/TableGenBackend.h"
+#include <list>
+
using llvm::ArrayRef;
using llvm::formatv;
using llvm::raw_ostream;
// raw_string_ostream needs a string&, use a vector to store all the string
// that are captured by reference within raw_string_ostream.
StringMap<raw_string_ostream> extensionSets;
- SmallVector<std::string, 1> extensionSetNames;
+ std::list<std::string> extensionSetNames;
initExtendedSetDeserializationDispatch(extensionSetName, instructionID, words,
os);