Index: include/llvm/TableGen/Record.h =================================================================== --- include/llvm/TableGen/Record.h +++ include/llvm/TableGen/Record.h @@ -1525,7 +1525,7 @@ }; class RecordKeeper { - using RecordMap = std::map>; + using RecordMap = std::map>; RecordMap Classes, Defs; public: Index: utils/TableGen/CTagsEmitter.cpp =================================================================== --- utils/TableGen/CTagsEmitter.cpp +++ utils/TableGen/CTagsEmitter.cpp @@ -28,18 +28,17 @@ class Tag { private: - const std::string *Id; + StringRef Id; SMLoc Loc; public: - Tag(const std::string &Name, const SMLoc Location) - : Id(&Name), Loc(Location) {} - int operator<(const Tag &B) const { return *Id < *B.Id; } + Tag(StringRef Name, const SMLoc Location) : Id(Name), Loc(Location) {} + int operator<(const Tag &B) const { return Id < B.Id; } void emit(raw_ostream &OS) const { const MemoryBuffer *CurMB = SrcMgr.getMemoryBuffer(SrcMgr.FindBufferContainingLoc(Loc)); auto BufferName = CurMB->getBufferIdentifier(); std::pair LineAndColumn = SrcMgr.getLineAndColumn(Loc); - OS << *Id << "\t" << BufferName << "\t" << LineAndColumn.first << "\n"; + OS << Id << "\t" << BufferName << "\t" << LineAndColumn.first << "\n"; } };