forked from OSchip/llvm-project
[Dominators] Define Arc less-than operator inline.
This fixes warnings on some buildbots. llvm-svn: 307974
This commit is contained in:
parent
697f2159bb
commit
3b4317cbc2
|
@ -16,8 +16,6 @@
|
|||
#include "llvm/Support/raw_ostream.h"
|
||||
#include "gtest/gtest.h"
|
||||
|
||||
#include <tuple>
|
||||
|
||||
#define DEBUG_TYPE "cfg-builder"
|
||||
|
||||
using namespace llvm;
|
||||
|
@ -30,10 +28,6 @@ CFGHolder::CFGHolder(StringRef ModuleName, StringRef FunctionName)
|
|||
}
|
||||
CFGHolder::~CFGHolder() = default;
|
||||
|
||||
bool llvm::operator<(const CFGBuilder::Arc &LHS, const CFGBuilder::Arc &RHS) {
|
||||
return std::tie(LHS.From, LHS.To) < std::tie(RHS.From, RHS.To);
|
||||
}
|
||||
|
||||
CFGBuilder::CFGBuilder(Function *F, const std::vector<Arc> &InitialArcs,
|
||||
std::vector<Update> Updates)
|
||||
: F(F), Updates(std::move(Updates)) {
|
||||
|
|
|
@ -23,6 +23,7 @@
|
|||
|
||||
#include <memory>
|
||||
#include <set>
|
||||
#include <tuple>
|
||||
#include <vector>
|
||||
|
||||
namespace llvm {
|
||||
|
@ -56,7 +57,10 @@ public:
|
|||
StringRef From;
|
||||
StringRef To;
|
||||
|
||||
friend bool operator<(const Arc &LHS, const Arc &RHS);
|
||||
friend bool operator<(const Arc &LHS, const Arc &RHS) {
|
||||
return std::tie(LHS.From, LHS.To) <
|
||||
std::tie(RHS.From, RHS.To);
|
||||
}
|
||||
};
|
||||
|
||||
enum class ActionKind { Insert, Delete };
|
||||
|
|
Loading…
Reference in New Issue