Replaced include/swift/Basic/Algorithm.h with calls to standard algorithms

LLVM now requires C++14, and the header says the algorithms are
backported from C++14.
This commit is contained in:
Dmitri Gribenko
2020-02-24 14:48:02 +01:00
parent d81161aa47
commit d4ff77550e
3 changed files with 4 additions and 41 deletions

View File

@@ -17,13 +17,12 @@
#ifndef SWIFT_BASIC_FLAGGEDPOINTER_H
#define SWIFT_BASIC_FLAGGEDPOINTER_H
#include <algorithm>
#include <cassert>
#include "llvm/Support/Compiler.h"
#include "llvm/Support/PointerLikeTypeTraits.h"
#include "Algorithm.h"
namespace swift {
/// This class implements a pair of a pointer and boolean flag.
@@ -170,7 +169,7 @@ public:
enum {
NumLowBitsAvailable = (BitPosition >= PtrTraits::NumLowBitsAvailable)
? PtrTraits::NumLowBitsAvailable
: (swift::min(int(BitPosition + 1),
: (std::min(int(BitPosition + 1),
int(PtrTraits::NumLowBitsAvailable)) - 1)
};
};