[PATCH] D83227: [flang] Add algorithm include to runtime/file.cpp for std::min
David Truby via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 6 12:54:04 PDT 2020
DavidTruby created this revision.
DavidTruby added reviewers: sscalpone, klausler.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
std::min is only guaranteed to exist in the <algorithm> header.
Currently this builds with libstdc++ because the algorithm include
is coming transitively from elsewhere, however it doesn't build with
libc++.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D83227
Files:
flang/runtime/file.cpp
Index: flang/runtime/file.cpp
===================================================================
--- flang/runtime/file.cpp
+++ flang/runtime/file.cpp
@@ -9,6 +9,7 @@
#include "file.h"
#include "magic-numbers.h"
#include "memory.h"
+#include <algorithm>
#include <cerrno>
#include <cstring>
#include <fcntl.h>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D83227.275706.patch
Type: text/x-patch
Size: 317 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200706/2a820f2f/attachment-0001.bin>
More information about the llvm-commits
mailing list