[tblgen] Fix implicit conversion only diagnosed by g++ 6

This commit is contained in:
Benjamin Kramer 2020-01-29 00:25:44 +01:00
parent b1a8189d7d
commit 05c19705d8
1 changed files with 3 additions and 3 deletions

View File

@ -1726,21 +1726,21 @@ public:
}
void addClass(std::unique_ptr<Record> R) {
bool Ins = Classes.insert(std::make_pair(R->getName(),
bool Ins = Classes.insert(std::make_pair(std::string(R->getName()),
std::move(R))).second;
(void)Ins;
assert(Ins && "Class already exists");
}
void addDef(std::unique_ptr<Record> R) {
bool Ins = Defs.insert(std::make_pair(R->getName(),
bool Ins = Defs.insert(std::make_pair(std::string(R->getName()),
std::move(R))).second;
(void)Ins;
assert(Ins && "Record already exists");
}
void addExtraGlobal(StringRef Name, Init *I) {
bool Ins = ExtraGlobals.insert(std::make_pair(Name, I)).second;
bool Ins = ExtraGlobals.insert(std::make_pair(std::string(Name), I)).second;
(void)Ins;
assert(!getDef(Name));
assert(Ins && "Global already exists");