llvm.org GIT mirror llvm / 6aaaf46
[XRay][graph] Disambiguate name of type from member name Follow-up to D29005. Differential Revision: https://reviews.llvm.org/D29005 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294722 91177308-0d34-0410-b5e6-96231b3b80d8 Dean Michael Berris 3 years ago
1 changed file(s) with 17 addition(s) and 17 deletion(s). Raw diff Collapse all Expand all
1616 using namespace xray;
1717
1818 namespace {
19 struct VA {
19 struct VAttr {
2020 unsigned VA;
2121 };
22 struct EA {
22 struct EAttr {
2323 unsigned EA;
2424 };
25 typedef Graph, EA, unsigned> GraphT;
25 typedef Graphttr, EAttr, unsigned> GraphT;
2626 typedef typename GraphT::VertexIdentifier VI;
2727 typedef typename GraphT::EdgeIdentifier EI;
2828
3535 static T getTestGraph() {
3636 using std::make_pair;
3737 typename std::remove_const::type G;
38 G.insert(make_pair(1u, VA({3u})));
39 G.insert(make_pair(2u, VA({5u})));
40 G.insert(make_pair(3u, VA({7u})));
41 G.insert(make_pair(4u, VA({11u})));
42 G.insert(make_pair(5u, VA({13u})));
43 G.insert(make_pair(6u, VA({17u})));
44
45 G.insert(std::make_pair(EI(1u, 2u), EA({3u * 5u})));
46 G.insert(std::make_pair(EI(2u, 3u), EA({5u * 7u})));
47 G.insert(std::make_pair(EI(6u, 3u), EA({2u * 7u * 17u})));
48 G.insert(std::make_pair(EI(4u, 6u), EA({11u * 17u})));
49 G.insert(std::make_pair(EI(2u, 4u), EA({5u * 11u})));
50 G.insert(std::make_pair(EI(2u, 5u), EA({5u * 13u})));
51 G.insert(std::make_pair(EI(4u, 5u), EA({11u * 13u})));
38 G.insert(make_pair(1u, VAttr({3u})));
39 G.insert(make_pair(2u, VAttr({5u})));
40 G.insert(make_pair(3u, VAttr({7u})));
41 G.insert(make_pair(4u, VAttr({11u})));
42 G.insert(make_pair(5u, VAttr({13u})));
43 G.insert(make_pair(6u, VAttr({17u})));
44
45 G.insert(std::make_pair(EI(1u, 2u), EAttr({3u * 5u})));
46 G.insert(std::make_pair(EI(2u, 3u), EAttr({5u * 7u})));
47 G.insert(std::make_pair(EI(6u, 3u), EAttr({2u * 7u * 17u})));
48 G.insert(std::make_pair(EI(4u, 6u), EAttr({11u * 17u})));
49 G.insert(std::make_pair(EI(2u, 4u), EAttr({5u * 11u})));
50 G.insert(std::make_pair(EI(2u, 5u), EAttr({5u * 13u})));
51 G.insert(std::make_pair(EI(4u, 5u), EAttr({11u * 13u})));
5252
5353 return G;
5454 }