llvm.org GIT mirror llvm / 486906f
[Dominators] Define Arc less-than operator inline. This fixes warnings on some buildbots. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307974 91177308-0d34-0410-b5e6-96231b3b80d8 Jakub Kuderski 2 years ago
2 changed file(s) with 5 addition(s) and 7 deletion(s). Raw diff Collapse all Expand all
1515 #include "llvm/Support/raw_ostream.h"
1616 #include "gtest/gtest.h"
1717
18 #include
19
2018 #define DEBUG_TYPE "cfg-builder"
2119
2220 using namespace llvm;
2826 F = cast(M->getOrInsertFunction(FunctionName, FTy));
2927 }
3028 CFGHolder::~CFGHolder() = default;
31
32 bool llvm::operator<(const CFGBuilder::Arc &LHS, const CFGBuilder::Arc &RHS) {
33 return std::tie(LHS.From, LHS.To) < std::tie(RHS.From, RHS.To);
34 }
3529
3630 CFGBuilder::CFGBuilder(Function *F, const std::vector &InitialArcs,
3731 std::vector Updates)
2222
2323 #include
2424 #include
25 #include
2526 #include
2627
2728 namespace llvm {
5556 StringRef From;
5657 StringRef To;
5758
58 friend bool operator<(const Arc &LHS, const Arc &RHS);
59 friend bool operator<(const Arc &LHS, const Arc &RHS) {
60 return std::tie(LHS.From, LHS.To) <
61 std::tie(RHS.From, RHS.To);
62 }
5963 };
6064
6165 enum class ActionKind { Insert, Delete };