Skip to content

Commit 0c35ae4

Browse files
committed
camel_case
1 parent 21f3ac4 commit 0c35ae4

File tree

6 files changed

+75
-75
lines changed

6 files changed

+75
-75
lines changed

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -92,11 +92,11 @@ Explore the types:
9292

9393
```groovy
9494
gremlin> g.V().hasLabel('type').valueMap().unfold()
95-
==>type_id=[void_type]
96-
==>type_id=[label_type]
97-
==>type_id=[pointer_type]
98-
==>type_id=[function_type]
99-
==>type_id=[integer_type]
95+
==>typeID=[void]
96+
==>typeID=[label]
97+
==>typeID=[pointer]
98+
==>typeID=[function]
99+
==>typeID=[integer]
100100
==>bitwidth=[32]
101101
```
102102

src/Edge.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,19 +17,19 @@ static std::string edgeKindToString(EdgeKind kind) {
1717
case EdgeKind::Operand:
1818
return "operand";
1919
case EdgeKind::PointeeType:
20-
return "pointee_type";
20+
return "pointeeType";
2121
case EdgeKind::ReturnType:
22-
return "return_type";
22+
return "returnType";
2323
case EdgeKind::ParameterType:
24-
return "parameter_type";
24+
return "parameterType";
2525
case EdgeKind::ElementType:
26-
return "element_type";
26+
return "elementType";
2727
case EdgeKind::Argument:
2828
return "argument";
2929
case EdgeKind::Type:
3030
return "type";
3131
case EdgeKind::BasicBlock:
32-
return "basic_block";
32+
return "basicBlock";
3333
}
3434
}
3535

src/Node.cpp

Lines changed: 36 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -26,80 +26,80 @@ static std::string valueKindToString(ValueKind kind) {
2626
case ValueKind::Argument:
2727
return "argument";
2828
case ValueKind::ConstantInt:
29-
return "constant_int";
29+
return "constantInt";
3030
case ValueKind::ConstantFP:
31-
return "constant_fp";
31+
return "constantFP";
3232
case ValueKind::ConstantPointerNull:
33-
return "constant_pointer_null";
33+
return "constantPointerNull";
3434
case ValueKind::ConstantTokenNone:
35-
return "constant_token_none";
35+
return "constantTokenNone";
3636
case ValueKind::UndefValue:
37-
return "undef_value";
37+
return "undefValue";
3838
case ValueKind::ConstantArray:
39-
return "constant_array";
39+
return "constantArray";
4040
case ValueKind::ConstantDataArray:
41-
return "constant_data_array";
41+
return "constantDataArray";
4242
case ValueKind::InlineAsm:
43-
return "inline_asm";
43+
return "inlineAsm";
4444
case ValueKind::MetadataAsValue:
45-
return "metadata_as_value";
45+
return "metadataAsValue";
4646
case ValueKind::BlockAddress:
47-
return "block_address";
47+
return "blockAddress";
4848
case ValueKind::GlobalAlias:
49-
return "global_alias";
49+
return "globalAlias";
5050
case ValueKind::GlobalIFunc:
51-
return "global_ifunc";
51+
return "globalIFunc";
5252
case ValueKind::GlobalVariable:
53-
return "global_variable";
53+
return "globalVariable";
5454
case ValueKind::ConstantExpr:
55-
return "constant_expr";
55+
return "constantExpr";
5656
case ValueKind::ConstantStruct:
57-
return "constant_struct";
57+
return "constantStruct";
5858
case ValueKind::ConstantVector:
59-
return "constant_vector";
59+
return "constantVector";
6060
case ValueKind::ConstantAggregateZero:
61-
return "constant_aggregate_zero";
61+
return "constantAggregateZero";
6262
case ValueKind::ConstantDataVector:
63-
return "block_constant_data_vector";
63+
return "constantDataVector";
6464
}
6565
}
6666

6767
static std::string typeKindToString(TypeKind kind) {
6868
switch (kind) {
6969
case TypeKind::Integer:
70-
return "integer_type";
70+
return "integer";
7171
case TypeKind::Void:
72-
return "void_type";
72+
return "void";
7373
case TypeKind::Half:
74-
return "half_type";
74+
return "half";
7575
case TypeKind::Float:
76-
return "float_type";
76+
return "float";
7777
case TypeKind::Double:
78-
return "double_type";
78+
return "double";
7979
case TypeKind::X86_FP80:
80-
return "x86_fp80_type";
80+
return "x86_fp80";
8181
case TypeKind::FP128:
82-
return "fp128_type";
82+
return "fp128";
8383
case TypeKind::PPC_FP128:
84-
return "ppc_fp128_type";
84+
return "ppc_fp128";
8585
case TypeKind::Metadata:
86-
return "metadata_type";
86+
return "metadata";
8787
case TypeKind::X86_MMX:
88-
return "x86_mmx_type";
88+
return "x86_mmx";
8989
case TypeKind::Token:
90-
return "token_type";
90+
return "token";
9191
case TypeKind::Function:
92-
return "function_type";
92+
return "function";
9393
case TypeKind::Struct:
94-
return "struct_type";
94+
return "struct";
9595
case TypeKind::Array:
96-
return "array_type";
96+
return "array";
9797
case TypeKind::Pointer:
98-
return "pointer_type";
98+
return "pointer";
9999
case TypeKind::Vector:
100-
return "vector_type";
100+
return "vector";
101101
case TypeKind::Label:
102-
return "label_type";
102+
return "label";
103103
}
104104
}
105105

@@ -179,7 +179,7 @@ Node &Node::setValueKind(llvm2graphml::ValueKind valueKind) {
179179
}
180180

181181
Node &Node::setTypeKind(TypeKind typeKind) {
182-
properties.setStringProperty("type_id", typeKindToString(typeKind));
182+
properties.setStringProperty("typeID", typeKindToString(typeKind));
183183
return *this;
184184
}
185185

tests/integration-tests/instruction/test.groovy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ dump(g.V().has('basicBlock', 'name', 'entry')
8181
dump(g.V().has('basicBlock', 'name', 'entry')
8282
.out('instruction').has('opcode', 'alloca')
8383
.out('operand').hasLabel('value').valueMap('kind'))
84-
// CHECK-NEXT: kind=[constant_int]
84+
// CHECK-NEXT: kind=[constantInt]
8585

8686
dump(g.V().has('basicBlock', 'name', 'entry')
8787
.out('instruction').has('opcode', 'icmp')

tests/integration-tests/regression/test.groovy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ def dump(tr) {
1919
dump(g.V().has('function', 'name', '-[Shape square]').valueMap('name'))
2020
// CHECK: name=[-[Shape square]]
2121

22-
dump(g.V().has('type', 'type_id', 'struct_type').valueMap('name'))
22+
dump(g.V().has('type', 'typeID', 'struct').valueMap('name'))
2323
// CHECK: name=[struct.std::_Rb_tree<std::__cxx11::basic_string<char>>::_Rb_tree_impl]
2424

2525
:exit

tests/integration-tests/type/test.groovy

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -19,43 +19,43 @@ def dump(tr) {
1919
dump(g.V().hasLabel('module').valueMap('moduleIdentifier'))
2020
// CHECK: moduleIdentifier=[main.ll]
2121

22-
dump(g.V().hasLabel('type').order().by('type_id', asc).valueMap('type_id').dedup())
23-
// CHECK-NEXT: type_id=[float_type]
24-
// CHECK-NEXT: type_id=[function_type]
25-
// CHECK-NEXT: type_id=[integer_type]
26-
// CHECK-NEXT: type_id=[label_type]
27-
// CHECK-NEXT: type_id=[pointer_type]
28-
// CHECK-NEXT: type_id=[struct_type]
29-
// CHECK-NEXT: type_id=[void_type]
30-
31-
dump(g.V().has('type', 'type_id', 'integer_type').order().by('bitwidth', asc).valueMap('bitwidth').dedup())
22+
dump(g.V().hasLabel('type').order().by('typeID', asc).valueMap('typeID').dedup())
23+
// CHECK-NEXT: typeID=[float]
24+
// CHECK-NEXT: typeID=[function]
25+
// CHECK-NEXT: typeID=[integer]
26+
// CHECK-NEXT: typeID=[label]
27+
// CHECK-NEXT: typeID=[pointer]
28+
// CHECK-NEXT: typeID=[struct]
29+
// CHECK-NEXT: typeID=[void]
30+
31+
dump(g.V().has('type', 'typeID', 'integer').order().by('bitwidth', asc).valueMap('bitwidth').dedup())
3232
// CHECK-NEXT: bitwidth=[1]
3333
// CHECK-NEXT: bitwidth=[32]
3434

35-
dump(g.V().has('type', 'type_id', 'pointer_type').outE('pointee_type').inV().order().by('type_id', asc).valueMap('type_id').dedup())
36-
// CHECK-NEXT: type_id=[function_type]
37-
// CHECK-NEXT: type_id=[integer_type]
38-
// CHECK-NEXT: type_id=[struct_type]
35+
dump(g.V().has('type', 'typeID', 'pointer').outE('pointeeType').inV().order().by('typeID', asc).valueMap('typeID').dedup())
36+
// CHECK-NEXT: typeID=[function]
37+
// CHECK-NEXT: typeID=[integer]
38+
// CHECK-NEXT: typeID=[struct]
3939

40-
dump(g.V().has('type', 'type_id', 'function_type').outE('return_type').inV().order().by('type_id', asc).valueMap('type_id').dedup())
41-
// CHECK-NEXT: type_id=[integer_type]
42-
// CHECK-NEXT: type_id=[void_type]
40+
dump(g.V().has('type', 'typeID', 'function').outE('returnType').inV().order().by('typeID', asc).valueMap('typeID').dedup())
41+
// CHECK-NEXT: typeID=[integer]
42+
// CHECK-NEXT: typeID=[void]
4343

44-
dump(g.V().has('type', 'type_id', 'function_type').outE('parameter_type').has('order', 0).inV().order().by('type_id', asc).valueMap('type_id').dedup())
45-
// CHECK-NEXT: type_id=[integer_type]
46-
// CHECK-NEXT: type_id=[pointer_type]
44+
dump(g.V().has('type', 'typeID', 'function').outE('parameterType').has('order', 0).inV().order().by('typeID', asc).valueMap('typeID').dedup())
45+
// CHECK-NEXT: typeID=[integer]
46+
// CHECK-NEXT: typeID=[pointer]
4747

48-
dump(g.V().has('type', 'type_id', 'struct_type').valueMap('name'))
48+
dump(g.V().has('type', 'typeID', 'struct').valueMap('name'))
4949
// CHECK-NEXT: name=[struct.Foo]
5050

51-
dump(g.V().has('type', 'type_id', 'struct_type').outE('element_type').has('order', 0).inV().valueMap('type_id'))
52-
// CHECK-NEXT: type_id=[integer_type]
51+
dump(g.V().has('type', 'typeID', 'struct').outE('elementType').has('order', 0).inV().valueMap('typeID'))
52+
// CHECK-NEXT: typeID=[integer]
5353

54-
dump(g.V().has('type', 'type_id', 'struct_type').outE('element_type').has('order', 1).inV().valueMap('type_id'))
55-
// CHECK-NEXT: type_id=[float_type]
54+
dump(g.V().has('type', 'typeID', 'struct').outE('elementType').has('order', 1).inV().valueMap('typeID'))
55+
// CHECK-NEXT: typeID=[float]
5656

57-
dump(g.V().has('function', 'name', 'abs').outE('argument').inV().outE('type').inV().order().by('type_id', asc).valueMap('type_id').dedup())
58-
// CHECK-NEXT: type_id=[integer_type]
57+
dump(g.V().has('function', 'name', 'abs').outE('argument').inV().outE('type').inV().order().by('typeID', asc).valueMap('typeID').dedup())
58+
// CHECK-NEXT: typeID=[integer]
5959

6060
:exit
6161
// CHECK-EMPTY:

0 commit comments

Comments
 (0)