aboutsummaryrefslogtreecommitdiff
path: root/llvm/tools/llvm-xray/xray-graph-diff.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/tools/llvm-xray/xray-graph-diff.cpp')
-rw-r--r--llvm/tools/llvm-xray/xray-graph-diff.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/llvm/tools/llvm-xray/xray-graph-diff.cpp b/llvm/tools/llvm-xray/xray-graph-diff.cpp
index 11210e2004a7..f22ea06e0537 100644
--- a/llvm/tools/llvm-xray/xray-graph-diff.cpp
+++ b/llvm/tools/llvm-xray/xray-graph-diff.cpp
@@ -294,10 +294,7 @@ static Twine truncateString(const StringRef &S, size_t n) {
}
template <typename T> static bool containsNullptr(const T &Collection) {
- for (const auto &E : Collection)
- if (E == nullptr)
- return true;
- return false;
+ return llvm::is_contained(Collection, nullptr);
}
static std::string getLabel(const GraphDiffRenderer::GraphT::EdgeValueType &E,
@@ -459,7 +456,7 @@ static CommandRegistration Unused(&GraphDiff, []() -> Error {
auto &GDR = *GDROrErr;
std::error_code EC;
- raw_fd_ostream OS(GraphDiffOutput, EC, sys::fs::OpenFlags::OF_Text);
+ raw_fd_ostream OS(GraphDiffOutput, EC, sys::fs::OpenFlags::OF_TextWithCRLF);
if (EC)
return make_error<StringError>(
Twine("Cannot open file '") + GraphDiffOutput + "' for writing.", EC);