Skip to content

Commit adcd026

Browse files
committed
Make llvm::StringRef to std::string conversions explicit.
This is how it should've been and brings it more in line with std::string_view. There should be no functional change here. This is mostly mechanical from a custom clang-tidy check, with a lot of manual fixups. It uncovers a lot of minor inefficiencies. This doesn't actually modify StringRef yet, I'll do that in a follow-up.
1 parent 5eaf44f commit adcd026

File tree

895 files changed

+3319
-3014
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

895 files changed

+3319
-3014
lines changed

Diff for: clang-tools-extra/clang-change-namespace/ChangeNamespace.cpp

+9-9
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ inline std::string
2323
joinNamespaces(const llvm::SmallVectorImpl<StringRef> &Namespaces) {
2424
if (Namespaces.empty())
2525
return "";
26-
std::string Result = Namespaces.front();
26+
std::string Result(Namespaces.front());
2727
for (auto I = Namespaces.begin() + 1, E = Namespaces.end(); I != E; ++I)
2828
Result += ("::" + *I).str();
2929
return Result;
@@ -184,7 +184,7 @@ void addReplacementOrDie(
184184
const SourceManager &SM,
185185
std::map<std::string, tooling::Replacements> *FileToReplacements) {
186186
const auto R = createReplacement(Start, End, ReplacementText, SM);
187-
auto Err = (*FileToReplacements)[R.getFilePath()].add(R);
187+
auto Err = (*FileToReplacements)[std::string(R.getFilePath())].add(R);
188188
if (Err)
189189
llvm_unreachable(llvm::toString(std::move(Err)).c_str());
190190
}
@@ -213,18 +213,18 @@ std::string getShortestQualifiedNameInNamespace(llvm::StringRef DeclName,
213213
DeclName = DeclName.ltrim(':');
214214
NsName = NsName.ltrim(':');
215215
if (DeclName.find(':') == llvm::StringRef::npos)
216-
return DeclName;
216+
return std::string(DeclName);
217217

218218
auto NsNameSplitted = splitSymbolName(NsName);
219219
auto DeclNsSplitted = splitSymbolName(DeclName);
220220
llvm::StringRef UnqualifiedDeclName = DeclNsSplitted.pop_back_val();
221221
// If the Decl is in global namespace, there is no need to shorten it.
222222
if (DeclNsSplitted.empty())
223-
return UnqualifiedDeclName;
223+
return std::string(UnqualifiedDeclName);
224224
// If NsName is the global namespace, we can simply use the DeclName sans
225225
// leading "::".
226226
if (NsNameSplitted.empty())
227-
return DeclName;
227+
return std::string(DeclName);
228228

229229
if (NsNameSplitted.front() != DeclNsSplitted.front()) {
230230
// The DeclName must be fully-qualified, but we still need to decide if a
@@ -233,7 +233,7 @@ std::string getShortestQualifiedNameInNamespace(llvm::StringRef DeclName,
233233
// to avoid conflict.
234234
if (llvm::is_contained(NsNameSplitted, DeclNsSplitted.front()))
235235
return ("::" + DeclName).str();
236-
return DeclName;
236+
return std::string(DeclName);
237237
}
238238
// Since there is already an overlap namespace, we know that `DeclName` can be
239239
// shortened, so we reduce the longest common prefix.
@@ -711,7 +711,7 @@ void ChangeNamespaceTool::moveOldNamespace(
711711
MoveNs.InsertionOffset = SM.getFileOffset(SM.getSpellingLoc(InsertionLoc));
712712
MoveNs.FID = SM.getFileID(Start);
713713
MoveNs.SourceMgr = Result.SourceManager;
714-
MoveNamespaces[SM.getFilename(Start)].push_back(MoveNs);
714+
MoveNamespaces[std::string(SM.getFilename(Start))].push_back(MoveNs);
715715
}
716716

717717
// Removes a class forward declaration from the code in the moved namespace and
@@ -762,7 +762,7 @@ void ChangeNamespaceTool::moveClassForwardDeclaration(
762762
InsertForwardDeclaration InsertFwd;
763763
InsertFwd.InsertionOffset = Insertion.getOffset();
764764
InsertFwd.ForwardDeclText = Insertion.getReplacementText().str();
765-
InsertFwdDecls[Insertion.getFilePath()].push_back(InsertFwd);
765+
InsertFwdDecls[std::string(Insertion.getFilePath())].push_back(InsertFwd);
766766
}
767767

768768
// Replaces a qualified symbol (in \p DeclCtx) that refers to a declaration \p
@@ -816,7 +816,7 @@ void ChangeNamespaceTool::replaceQualifiedSymbolInDeclContext(
816816
->getQualifiedNameAsString())) {
817817
FromDeclNameRef = FromDeclNameRef.drop_front(2);
818818
if (FromDeclNameRef.size() < ReplaceName.size())
819-
ReplaceName = FromDeclNameRef;
819+
ReplaceName = std::string(FromDeclNameRef);
820820
}
821821
}
822822
// Checks if there is any namespace alias declarations that can shorten the

Diff for: clang-tools-extra/clang-change-namespace/tool/ClangChangeNamespace.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ llvm::ErrorOr<std::vector<std::string>> GetWhiteListedSymbolPatterns() {
9191
llvm::StringRef Content = File.get()->getBuffer();
9292
Content.split(Lines, '\n', /*MaxSplit=*/-1, /*KeepEmpty=*/false);
9393
for (auto Line : Lines)
94-
Patterns.push_back(Line.trim());
94+
Patterns.push_back(std::string(Line.trim()));
9595
return Patterns;
9696
}
9797

Diff for: clang-tools-extra/clang-doc/Representation.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -286,9 +286,9 @@ ClangDocContext::ClangDocContext(tooling::ExecutionContext *ECtx,
286286
if (SourceRoot.empty())
287287
// If no SourceRoot was provided the current path is used as the default
288288
llvm::sys::fs::current_path(SourceRootDir);
289-
this->SourceRoot = SourceRootDir.str();
289+
this->SourceRoot = std::string(SourceRootDir.str());
290290
if (!RepositoryUrl.empty()) {
291-
this->RepositoryUrl = RepositoryUrl;
291+
this->RepositoryUrl = std::string(RepositoryUrl);
292292
if (!RepositoryUrl.empty() && RepositoryUrl.find("http://") != 0 &&
293293
RepositoryUrl.find("https://") != 0)
294294
this->RepositoryUrl->insert(0, "https://");

Diff for: clang-tools-extra/clang-doc/tool/ClangDocMain.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ int main(int argc, const char **argv) {
232232
llvm::sys::path::native(AssetsPath, IndexJS);
233233
llvm::sys::path::append(IndexJS, "index.js");
234234
CDCtx.UserStylesheets.insert(CDCtx.UserStylesheets.begin(),
235-
DefaultStylesheet.str());
235+
std::string(DefaultStylesheet.str()));
236236
CDCtx.FilesToCopy.emplace_back(IndexJS.str());
237237
}
238238

Diff for: clang-tools-extra/clang-include-fixer/InMemorySymbolIndex.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,12 @@ namespace include_fixer {
1616
InMemorySymbolIndex::InMemorySymbolIndex(
1717
const std::vector<SymbolAndSignals> &Symbols) {
1818
for (const auto &Symbol : Symbols)
19-
LookupTable[Symbol.Symbol.getName()].push_back(Symbol);
19+
LookupTable[std::string(Symbol.Symbol.getName())].push_back(Symbol);
2020
}
2121

2222
std::vector<SymbolAndSignals>
2323
InMemorySymbolIndex::search(llvm::StringRef Identifier) {
24-
auto I = LookupTable.find(Identifier);
24+
auto I = LookupTable.find(std::string(Identifier));
2525
if (I != LookupTable.end())
2626
return I->second;
2727
return {};

Diff for: clang-tools-extra/clang-include-fixer/IncludeFixer.cpp

+6-4
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,7 @@ std::string IncludeFixerSemaSource::minimizeInclude(
302302
StringRef Include, const clang::SourceManager &SourceManager,
303303
clang::HeaderSearch &HeaderSearch) const {
304304
if (!MinimizeIncludePaths)
305-
return Include;
305+
return std::string(Include);
306306

307307
// Get the FileEntry for the include.
308308
StringRef StrippedInclude = Include.trim("\"<>");
@@ -311,7 +311,7 @@ std::string IncludeFixerSemaSource::minimizeInclude(
311311
// If the file doesn't exist return the path from the database.
312312
// FIXME: This should never happen.
313313
if (!Entry)
314-
return Include;
314+
return std::string(Include);
315315

316316
bool IsSystem = false;
317317
std::string Suggestion =
@@ -352,7 +352,8 @@ IncludeFixerSemaSource::query(StringRef Query, StringRef ScopedQualifiers,
352352
if (!GenerateDiagnostics && !QuerySymbolInfos.empty()) {
353353
if (ScopedQualifiers == QuerySymbolInfos.front().ScopedQualifiers &&
354354
Query == QuerySymbolInfos.front().RawIdentifier) {
355-
QuerySymbolInfos.push_back({Query.str(), ScopedQualifiers, Range});
355+
QuerySymbolInfos.push_back(
356+
{Query.str(), std::string(ScopedQualifiers), Range});
356357
}
357358
return {};
358359
}
@@ -367,7 +368,8 @@ IncludeFixerSemaSource::query(StringRef Query, StringRef ScopedQualifiers,
367368
CI->getSourceManager().getLocForStartOfFile(
368369
CI->getSourceManager().getMainFileID()));
369370

370-
QuerySymbolInfos.push_back({Query.str(), ScopedQualifiers, Range});
371+
QuerySymbolInfos.push_back(
372+
{Query.str(), std::string(ScopedQualifiers), Range});
371373

372374
// Query the symbol based on C++ name Lookup rules.
373375
// Firstly, lookup the identifier with scoped namespace contexts;

Diff for: clang-tools-extra/clang-include-fixer/IncludeFixer.h

+3-1
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,9 @@ class IncludeFixerSemaSource : public clang::ExternalSemaSource {
9292
GenerateDiagnostics(GenerateDiagnostics) {}
9393

9494
void setCompilerInstance(CompilerInstance *CI) { this->CI = CI; }
95-
void setFilePath(StringRef FilePath) { this->FilePath = FilePath; }
95+
void setFilePath(StringRef FilePath) {
96+
this->FilePath = std::string(FilePath);
97+
}
9698

9799
/// Callback for incomplete types. If we encounter a forward declaration we
98100
/// have the fully qualified name ready. Just query that.

Diff for: clang-tools-extra/clang-include-fixer/IncludeFixerContext.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ std::string createQualifiedNameForReplacement(
2929
// No need to add missing qualifiers if SymbolIdentifier has a global scope
3030
// operator "::".
3131
if (RawSymbolName.startswith("::"))
32-
return RawSymbolName;
32+
return std::string(RawSymbolName);
3333

3434
std::string QualifiedName = MatchedSymbol.getQualifiedName();
3535

Diff for: clang-tools-extra/clang-include-fixer/find-all-symbols/FindAllSymbols.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,8 @@ void FindAllSymbols::run(const MatchFinder::MatchResult &Result) {
251251

252252
const SourceManager *SM = Result.SourceManager;
253253
if (auto Symbol = CreateSymbolInfo(ND, *SM, Collector)) {
254-
Filename = SM->getFileEntryForID(SM->getMainFileID())->getName();
254+
Filename =
255+
std::string(SM->getFileEntryForID(SM->getMainFileID())->getName());
255256
FileSymbols[*Symbol] += Signals;
256257
}
257258
}

Diff for: clang-tools-extra/clang-include-fixer/find-all-symbols/HeaderMapCollector.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ class HeaderMapCollector {
2929

3030
void addHeaderMapping(llvm::StringRef OrignalHeaderPath,
3131
llvm::StringRef MappingHeaderPath) {
32-
HeaderMappingTable[OrignalHeaderPath] = MappingHeaderPath;
32+
HeaderMappingTable[OrignalHeaderPath] = std::string(MappingHeaderPath);
3333
};
3434

3535
/// Check if there is a mapping from \p Header or a regex pattern that matches

Diff for: clang-tools-extra/clang-include-fixer/find-all-symbols/PathConfig.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ std::string getIncludePath(const SourceManager &SM, SourceLocation Loc,
3434
SmallString<256> CleanedFilePath = FilePath;
3535
llvm::sys::path::remove_dots(CleanedFilePath, /*remove_dot_dot=*/false);
3636

37-
return CleanedFilePath.str();
37+
return std::string(CleanedFilePath.str());
3838
}
3939

4040
} // namespace find_all_symbols

Diff for: clang-tools-extra/clang-include-fixer/find-all-symbols/SymbolInfo.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ class SymbolInfo {
7474
SymbolInfo(llvm::StringRef Name, SymbolKind Type, llvm::StringRef FilePath,
7575
const std::vector<Context> &Contexts);
7676

77-
void SetFilePath(llvm::StringRef Path) { FilePath = Path; }
77+
void SetFilePath(llvm::StringRef Path) { FilePath = std::string(Path); }
7878

7979
/// Get symbol name.
8080
llvm::StringRef getName() const { return Name; }

Diff for: clang-tools-extra/clang-include-fixer/plugin/IncludeFixerPlugin.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,8 @@ class ClangIncludeFixerPluginAction : public PluginASTAction {
6060
Input = Arg.substr(strlen("-input="));
6161
}
6262

63-
std::string InputFile = CI.getFrontendOpts().Inputs[0].getFile();
63+
std::string InputFile =
64+
std::string(CI.getFrontendOpts().Inputs[0].getFile());
6465
auto CreateYamlIdx = [=]() -> std::unique_ptr<include_fixer::SymbolIndex> {
6566
llvm::ErrorOr<std::unique_ptr<include_fixer::YamlSymbolIndex>> SymbolIdx(
6667
nullptr);

Diff for: clang-tools-extra/clang-move/Move.cpp

+4-4
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ std::string CleanPath(StringRef PathRef) {
6565
llvm::sys::path::remove_dots(Path, /*remove_dot_dot=*/true);
6666
// FIXME: figure out why this is necessary.
6767
llvm::sys::path::native(Path);
68-
return Path.str();
68+
return std::string(Path.str());
6969
}
7070

7171
// Make the Path absolute using the CurrentDir if the Path is not an absolute
@@ -785,13 +785,13 @@ void ClangMoveTool::removeDeclsInOldFiles() {
785785
continue;
786786
}
787787
auto CleanReplacements = format::cleanupAroundReplacements(
788-
Code, Context->FileToReplacements[FilePath], *Style);
788+
Code, Context->FileToReplacements[std::string(FilePath)], *Style);
789789

790790
if (!CleanReplacements) {
791791
llvm::errs() << llvm::toString(CleanReplacements.takeError()) << "\n";
792792
continue;
793793
}
794-
Context->FileToReplacements[FilePath] = *CleanReplacements;
794+
Context->FileToReplacements[std::string(FilePath)] = *CleanReplacements;
795795
}
796796
}
797797

@@ -870,7 +870,7 @@ void ClangMoveTool::moveAll(SourceManager &SM, StringRef OldFile,
870870
else if (Context->Spec.NewHeader == NewFile &&
871871
OldHeaderIncludeRangeInHeader.isValid())
872872
ReplaceOldInclude(OldHeaderIncludeRangeInHeader);
873-
Context->FileToReplacements[NewFile] = std::move(AllCode);
873+
Context->FileToReplacements[std::string(NewFile)] = std::move(AllCode);
874874
}
875875
}
876876

Diff for: clang-tools-extra/clang-move/tool/ClangMove.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,8 @@ int main(int argc, const char **argv) {
124124
Twine(EC.message()));
125125

126126
move::ClangMoveContext Context{Spec, Tool.getReplacements(),
127-
InitialDirectory.str(), Style, DumpDecls};
127+
std::string(InitialDirectory.str()), Style,
128+
DumpDecls};
128129
move::DeclarationReporter Reporter;
129130
move::ClangMoveActionFactory Factory(&Context, &Reporter);
130131

Diff for: clang-tools-extra/clang-query/QueryParser.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,8 @@ template <typename T> struct QueryParser::LexOrCompleteWord {
8282
CaseStr.substr(0, WordCompletionPos) ==
8383
Word.substr(0, WordCompletionPos))
8484
P->Completions.push_back(LineEditor::Completion(
85-
(CaseStr.substr(WordCompletionPos) + " ").str(), CaseStr));
85+
(CaseStr.substr(WordCompletionPos) + " ").str(),
86+
std::string(CaseStr)));
8687
return *this;
8788
}
8889

Diff for: clang-tools-extra/clang-reorder-fields/ReorderFieldsAction.cpp

+3-2
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,8 @@ using llvm::SmallSetVector;
3636
static const RecordDecl *findDefinition(StringRef RecordName,
3737
ASTContext &Context) {
3838
auto Results =
39-
match(recordDecl(hasName(RecordName), isDefinition()).bind("recordDecl"),
39+
match(recordDecl(hasName(std::string(RecordName)), isDefinition())
40+
.bind("recordDecl"),
4041
Context);
4142
if (Results.empty()) {
4243
llvm::errs() << "Definition of " << RecordName << " not found\n";
@@ -89,7 +90,7 @@ addReplacement(SourceRange Old, SourceRange New, const ASTContext &Context,
8990
tooling::Replacement R(Context.getSourceManager(),
9091
CharSourceRange::getTokenRange(Old), NewText,
9192
Context.getLangOpts());
92-
consumeError(Replacements[R.getFilePath()].add(R));
93+
consumeError(Replacements[std::string(R.getFilePath())].add(R));
9394
}
9495

9596
/// Find all member fields used in the given init-list initializer expr

Diff for: clang-tools-extra/clang-tidy/ClangTidy.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -596,7 +596,7 @@ void exportReplacements(const llvm::StringRef MainFilePath,
596596
const std::vector<ClangTidyError> &Errors,
597597
raw_ostream &OS) {
598598
TranslationUnitDiagnostics TUD;
599-
TUD.MainSourceFile = MainFilePath;
599+
TUD.MainSourceFile = std::string(MainFilePath);
600600
for (const auto &Error : Errors) {
601601
tooling::Diagnostic Diag = Error;
602602
TUD.Diagnostics.insert(TUD.Diagnostics.end(), Diag);

Diff for: clang-tools-extra/clang-tidy/ClangTidyCheck.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ std::string ClangTidyCheck::OptionsView::get(StringRef LocalName,
3939
const auto &Iter = CheckOptions.find(NamePrefix + LocalName.str());
4040
if (Iter != CheckOptions.end())
4141
return Iter->second;
42-
return Default;
42+
return std::string(Default);
4343
}
4444

4545
std::string
@@ -52,13 +52,13 @@ ClangTidyCheck::OptionsView::getLocalOrGlobal(StringRef LocalName,
5252
Iter = CheckOptions.find(LocalName.str());
5353
if (Iter != CheckOptions.end())
5454
return Iter->second;
55-
return Default;
55+
return std::string(Default);
5656
}
5757

5858
void ClangTidyCheck::OptionsView::store(ClangTidyOptions::OptionMap &Options,
5959
StringRef LocalName,
6060
StringRef Value) const {
61-
Options[NamePrefix + LocalName.str()] = Value;
61+
Options[NamePrefix + LocalName.str()] = std::string(Value);
6262
}
6363

6464
void ClangTidyCheck::OptionsView::store(ClangTidyOptions::OptionMap &Options,

Diff for: clang-tools-extra/clang-tidy/ClangTidyDiagnosticConsumer.cpp

+5-5
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ void ClangTidyContext::setSourceManager(SourceManager *SourceMgr) {
172172
}
173173

174174
void ClangTidyContext::setCurrentFile(StringRef File) {
175-
CurrentFile = File;
175+
CurrentFile = std::string(File);
176176
CurrentOptions = getOptionsForFile(CurrentFile);
177177
CheckFilter = std::make_unique<CachedGlobList>(*getOptions().Checks);
178178
WarningAsErrorFilter =
@@ -202,7 +202,7 @@ ClangTidyOptions ClangTidyContext::getOptionsForFile(StringRef File) const {
202202
void ClangTidyContext::setEnableProfiling(bool P) { Profile = P; }
203203

204204
void ClangTidyContext::setProfileStoragePrefix(StringRef Prefix) {
205-
ProfilePrefix = Prefix;
205+
ProfilePrefix = std::string(Prefix);
206206
}
207207

208208
llvm::Optional<ClangTidyProfiling::StorageParams>
@@ -224,8 +224,8 @@ bool ClangTidyContext::treatAsError(StringRef CheckName) const {
224224
}
225225

226226
std::string ClangTidyContext::getCheckName(unsigned DiagnosticID) const {
227-
std::string ClangWarningOption =
228-
DiagEngine->getDiagnosticIDs()->getWarningOptionForDiag(DiagnosticID);
227+
std::string ClangWarningOption = std::string(
228+
DiagEngine->getDiagnosticIDs()->getWarningOptionForDiag(DiagnosticID));
229229
if (!ClangWarningOption.empty())
230230
return "clang-diagnostic-" + ClangWarningOption;
231231
llvm::DenseMap<unsigned, std::string>::const_iterator I =
@@ -661,7 +661,7 @@ void ClangTidyDiagnosticConsumer::removeIncompatibleErrors() {
661661
for (const auto &Replace : FileAndReplace.second) {
662662
unsigned Begin = Replace.getOffset();
663663
unsigned End = Begin + Replace.getLength();
664-
const std::string &FilePath = Replace.getFilePath();
664+
const std::string &FilePath = std::string(Replace.getFilePath());
665665
// FIXME: Handle empty intervals, such as those from insertions.
666666
if (Begin == End)
667667
continue;

Diff for: clang-tools-extra/clang-tidy/ClangTidyDiagnosticConsumer.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ class ClangTidyContext {
154154

155155
/// Should be called when starting to process new translation unit.
156156
void setCurrentBuildDirectory(StringRef BuildDirectory) {
157-
CurrentBuildDirectory = BuildDirectory;
157+
CurrentBuildDirectory = std::string(BuildDirectory);
158158
}
159159

160160
/// Returns build directory of the current translation unit.

Diff for: clang-tools-extra/clang-tidy/ClangTidyModule.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ namespace tidy {
1717

1818
void ClangTidyCheckFactories::registerCheckFactory(StringRef Name,
1919
CheckFactory Factory) {
20-
Factories[Name] = std::move(Factory);
20+
Factories[std::string(Name)] = std::move(Factory);
2121
}
2222

2323
std::vector<std::unique_ptr<ClangTidyCheck>>

Diff for: clang-tools-extra/clang-tidy/abseil/DurationFactoryScaleCheck.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ getScaleForFactory(llvm::StringRef FactoryName) {
3131
{"Minutes", DurationScale::Minutes},
3232
{"Hours", DurationScale::Hours}});
3333

34-
auto ScaleIter = ScaleMap.find(FactoryName);
34+
auto ScaleIter = ScaleMap.find(std::string(FactoryName));
3535
if (ScaleIter == ScaleMap.end())
3636
return llvm::None;
3737

0 commit comments

Comments
 (0)