Skip to content

Commit 91b6aae

Browse files
Address comments.
1 parent 4bff5ed commit 91b6aae

File tree

2 files changed

+4
-8
lines changed

2 files changed

+4
-8
lines changed

llvm/lib/Support/GraphWriter.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,9 +102,8 @@ static std::string replaceIllegalFilenameChars(std::string Filename,
102102
std::string IllegalChars =
103103
is_style_windows(sys::path::Style::native) ? "\\/:?\"<>|" : "/";
104104

105-
for (char IllegalChar : IllegalChars) {
105+
for (char IllegalChar : IllegalChars)
106106
llvm::replace(Filename, IllegalChar, ReplacementChar);
107-
}
108107

109108
return Filename;
110109
}

llvm/tools/llvm-config/llvm-config.cpp

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -142,9 +142,8 @@ static void VisitComponent(const std::string &Name,
142142
if (AC->Library) {
143143
if (Missing && GetComponentLibraryPath) {
144144
std::string path = (*GetComponentLibraryPath)(AC->Library);
145-
if (DirSep == "\\") {
145+
if (DirSep == "\\")
146146
llvm::replace(path, '/', '\\');
147-
}
148147
if (!sys::fs::exists(path))
149148
Missing->push_back(path);
150149
}
@@ -436,9 +435,8 @@ int main(int argc, char **argv) {
436435

437436
if (BuiltDyLib) {
438437
std::string path((SharedDir + DirSep + DyLibName).str());
439-
if (DirSep == "\\") {
438+
if (DirSep == "\\")
440439
llvm::replace(path, '/', '\\');
441-
}
442440
DyLibExists = sys::fs::exists(path);
443441
if (!DyLibExists) {
444442
// The shared library does not exist: don't error unless the user
@@ -553,9 +551,8 @@ int main(int argc, char **argv) {
553551
Components.push_back(AC.Name);
554552
if (AC.Library && !IsInDevelopmentTree) {
555553
std::string path(GetComponentLibraryPath(AC.Library, false));
556-
if (DirSep == "\\") {
554+
if (DirSep == "\\")
557555
llvm::replace(path, '/', '\\');
558-
}
559556
if (DyLibExists && !sys::fs::exists(path)) {
560557
Components =
561558
GetAllDyLibComponents(IsInDevelopmentTree, true, DirSep);

0 commit comments

Comments
 (0)