@@ -79,7 +79,7 @@ struct CustomMappingTraits<
7979 }
8080 Args.push_back (Arg);
8181 }
82- io.mapRequired (Key. str (). c_str () , V[Args]);
82+ io.mapRequired (Key, V[Args]);
8383 }
8484 static void output (
8585 IO &io,
@@ -91,7 +91,7 @@ struct CustomMappingTraits<
9191 Key += ' ,' ;
9292 Key += llvm::utostr (Arg);
9393 }
94- io.mapRequired (Key. c_str () , P.second );
94+ io.mapRequired (Key, P.second );
9595 }
9696 }
9797};
@@ -122,11 +122,11 @@ struct CustomMappingTraits<std::map<uint64_t, WholeProgramDevirtResolution>> {
122122 io.setError (" key not an integer" );
123123 return ;
124124 }
125- io.mapRequired (Key. str (). c_str () , V[KeyInt]);
125+ io.mapRequired (Key, V[KeyInt]);
126126 }
127127 static void output (IO &io, std::map<uint64_t , WholeProgramDevirtResolution> &V) {
128128 for (auto &P : V)
129- io.mapRequired (llvm::utostr (P.first ). c_str () , P.second );
129+ io.mapRequired (llvm::utostr (P.first ), P.second );
130130 }
131131};
132132
@@ -215,7 +215,7 @@ namespace yaml {
215215template <> struct CustomMappingTraits <GlobalValueSummaryMapTy> {
216216 static void inputOne (IO &io, StringRef Key, GlobalValueSummaryMapTy &V) {
217217 std::vector<GlobalValueSummaryYaml> GVSums;
218- io.mapRequired (Key. str (). c_str () , GVSums);
218+ io.mapRequired (Key, GVSums);
219219 uint64_t KeyInt;
220220 if (Key.getAsInteger (0 , KeyInt)) {
221221 io.setError (" key not an integer" );
@@ -290,7 +290,7 @@ template <> struct CustomMappingTraits<GlobalValueSummaryMapTy> {
290290 }
291291 }
292292 if (!GVSums.empty ())
293- io.mapRequired (llvm::utostr (P.first ). c_str () , GVSums);
293+ io.mapRequired (llvm::utostr (P.first ), GVSums);
294294 }
295295 }
296296 static void fixAliaseeLinks (GlobalValueSummaryMapTy &V) {
@@ -313,12 +313,12 @@ template <> struct CustomMappingTraits<GlobalValueSummaryMapTy> {
313313template <> struct CustomMappingTraits <TypeIdSummaryMapTy> {
314314 static void inputOne (IO &io, StringRef Key, TypeIdSummaryMapTy &V) {
315315 TypeIdSummary TId;
316- io.mapRequired (Key. str (). c_str () , TId);
316+ io.mapRequired (Key, TId);
317317 V.insert ({GlobalValue::getGUIDAssumingExternalLinkage (Key), {Key, TId}});
318318 }
319319 static void output (IO &io, TypeIdSummaryMapTy &V) {
320320 for (auto &TidIter : V)
321- io.mapRequired (TidIter.second .first . str (). c_str () , TidIter.second .second );
321+ io.mapRequired (TidIter.second .first , TidIter.second .second );
322322 }
323323};
324324
0 commit comments