@@ -29,88 +29,90 @@ class Emitter {
2929 TypeEmitter &typeEmitter;
3030 std::unordered_map<const llvm::Value *, Node *> emittedValues;
3131
32- void dispatchInstruction (const llvm::Instruction *instruction, Node * node);
33- Node * emit (const llvm::Value *value);
32+ void dispatchInstruction (const llvm::Instruction *instruction, Node & node);
33+ Node & emit (const llvm::Value *value);
3434
35- Node *functionNode (const llvm::Value *value);
36- Node *basicBlockNode (const llvm::Value *value);
37- Node *instructionNode (const llvm::Value *value);
38- Node *valueNode (const llvm::Value *value);
35+ Node &newFunctionNode (const llvm::Value *value);
36+ Node &newBasicBlockNode (const llvm::Value *value);
37+ Node &newInstructionNode (const llvm::Value *value);
38+ Node &newValueNode (const llvm::Value *value);
39+
40+ Node &node (const llvm::Value *value);
3941
4042 // / Extension points
4143
42- void fillIn (const llvm::Module *module , Node * node);
43- void fillIn (const llvm::Function *function, Node * node);
44- void fillIn (const llvm::BasicBlock *basicBlock, Node * node);
45-
46- void fillIn (const llvm::Argument *argument, Node * node);
47- void fillIn (const llvm::ConstantInt *constant, Node * node);
48- void fillIn (const llvm::ConstantFP *constant, Node * node);
49- void fillIn (const llvm::ConstantPointerNull *constant, Node * node);
50- void fillIn (const llvm::ConstantTokenNone *constant, Node * node);
51- void fillIn (const llvm::UndefValue *undefValue, Node * node);
52- void fillIn (const llvm::InlineAsm *inlineAsm, Node * node);
53- void fillIn (const llvm::MetadataAsValue *metadataAsValue, llvm2graphml::Node * node);
54- void fillIn (const llvm::BlockAddress *blockAddress, llvm2graphml::Node * node);
55- void fillIn (const llvm::ConstantArray *constantArray, llvm2graphml::Node * node);
56- void fillIn (const llvm::ConstantDataArray *constantArray, llvm2graphml::Node * node);
57- void fillIn (const llvm::GlobalAlias *globalAlias, llvm2graphml::Node * node);
58- void fillIn (const llvm::GlobalIFunc *globalIFunc, llvm2graphml::Node * node);
59- void fillIn (const llvm::GlobalVariable *globalVariable, llvm2graphml::Node * node);
60- void fillIn (const llvm::ConstantExpr *constantExpr, llvm2graphml::Node * node);
61- void fillIn (const llvm::ConstantStruct *constantStruct, llvm2graphml::Node * node);
62- void fillIn (const llvm::ConstantVector *constantVector, llvm2graphml::Node * node);
63- void fillIn (const llvm::ConstantAggregateZero *constantZero, llvm2graphml::Node * node);
64- void fillIn (const llvm::ConstantDataVector *constantVector, llvm2graphml::Node * node);
65-
66- void fillIn (const llvm::Instruction *instruction, Node * node);
67- void fillIn (const llvm::ReturnInst *instruction, Node * node);
68- void fillIn (const llvm::BranchInst *instruction, Node * node);
69- void fillIn (const llvm::SwitchInst *instruction, Node * node);
70- void fillIn (const llvm::IndirectBrInst *instruction, Node * node);
71- void fillIn (const llvm::InvokeInst *instruction, Node * node);
72- void fillIn (const llvm::ResumeInst *instruction, Node * node);
73- void fillIn (const llvm::UnreachableInst *instruction, Node * node);
74- void fillIn (const llvm::CleanupReturnInst *instruction, Node * node);
75- void fillIn (const llvm::CatchReturnInst *instruction, Node * node);
76- void fillIn (const llvm::CatchSwitchInst *instruction, Node * node);
77- void fillIn (const llvm::CallBrInst *instruction, Node * node);
78- void fillIn (const llvm::UnaryOperator *instruction, Node * node);
79- void fillIn (const llvm::BinaryOperator *instruction, Node * node);
80- void fillIn (const llvm::AllocaInst *instruction, Node * node);
81- void fillIn (const llvm::LoadInst *instruction, Node * node);
82- void fillIn (const llvm::StoreInst *instruction, Node * node);
83- void fillIn (const llvm::GetElementPtrInst *instruction, Node * node);
84- void fillIn (const llvm::FenceInst *instruction, Node * node);
85- void fillIn (const llvm::AtomicCmpXchgInst *instruction, Node * node);
86- void fillIn (const llvm::AtomicRMWInst *instruction, Node * node);
87- void fillIn (const llvm::TruncInst *instruction, Node * node);
88- void fillIn (const llvm::ZExtInst *instruction, Node * node);
89- void fillIn (const llvm::SExtInst *instruction, Node * node);
90- void fillIn (const llvm::FPToUIInst *instruction, Node * node);
91- void fillIn (const llvm::FPToSIInst *instruction, Node * node);
92- void fillIn (const llvm::UIToFPInst *instruction, Node * node);
93- void fillIn (const llvm::SIToFPInst *instruction, Node * node);
94- void fillIn (const llvm::FPTruncInst *instruction, Node * node);
95- void fillIn (const llvm::FPExtInst *instruction, Node * node);
96- void fillIn (const llvm::PtrToIntInst *instruction, Node * node);
97- void fillIn (const llvm::IntToPtrInst *instruction, Node * node);
98- void fillIn (const llvm::BitCastInst *instruction, Node * node);
99- void fillIn (const llvm::AddrSpaceCastInst *instruction, Node * node);
100- void fillIn (const llvm::CleanupPadInst *instruction, Node * node);
101- void fillIn (const llvm::CatchPadInst *instruction, Node * node);
102- void fillIn (const llvm::ICmpInst *instruction, Node * node);
103- void fillIn (const llvm::FCmpInst *instruction, Node * node);
104- void fillIn (const llvm::PHINode *instruction, Node * node);
105- void fillIn (const llvm::CallInst *instruction, Node * node);
106- void fillIn (const llvm::SelectInst *instruction, Node * node);
107- void fillIn (const llvm::VAArgInst *instruction, Node * node);
108- void fillIn (const llvm::ExtractElementInst *instruction, Node * node);
109- void fillIn (const llvm::InsertElementInst *instruction, Node * node);
110- void fillIn (const llvm::ShuffleVectorInst *instruction, Node * node);
111- void fillIn (const llvm::ExtractValueInst *instruction, Node * node);
112- void fillIn (const llvm::InsertValueInst *instruction, Node * node);
113- void fillIn (const llvm::LandingPadInst *instruction, Node * node);
44+ void fillIn (const llvm::Module *module , Node & node);
45+ void fillIn (const llvm::Function *function, Node & node);
46+ void fillIn (const llvm::BasicBlock *basicBlock, Node & node);
47+
48+ void fillIn (const llvm::Argument *argument, Node & node);
49+ void fillIn (const llvm::ConstantInt *constant, Node & node);
50+ void fillIn (const llvm::ConstantFP *constant, Node & node);
51+ void fillIn (const llvm::ConstantPointerNull *constant, Node & node);
52+ void fillIn (const llvm::ConstantTokenNone *constant, Node & node);
53+ void fillIn (const llvm::UndefValue *undefValue, Node & node);
54+ void fillIn (const llvm::InlineAsm *inlineAsm, Node & node);
55+ void fillIn (const llvm::MetadataAsValue *metadataAsValue, llvm2graphml::Node & node);
56+ void fillIn (const llvm::BlockAddress *blockAddress, llvm2graphml::Node & node);
57+ void fillIn (const llvm::ConstantArray *constantArray, llvm2graphml::Node & node);
58+ void fillIn (const llvm::ConstantDataArray *constantArray, llvm2graphml::Node & node);
59+ void fillIn (const llvm::GlobalAlias *globalAlias, llvm2graphml::Node & node);
60+ void fillIn (const llvm::GlobalIFunc *globalIFunc, llvm2graphml::Node & node);
61+ void fillIn (const llvm::GlobalVariable *globalVariable, llvm2graphml::Node & node);
62+ void fillIn (const llvm::ConstantExpr *constantExpr, llvm2graphml::Node & node);
63+ void fillIn (const llvm::ConstantStruct *constantStruct, llvm2graphml::Node & node);
64+ void fillIn (const llvm::ConstantVector *constantVector, llvm2graphml::Node & node);
65+ void fillIn (const llvm::ConstantAggregateZero *constantZero, llvm2graphml::Node & node);
66+ void fillIn (const llvm::ConstantDataVector *constantVector, llvm2graphml::Node & node);
67+
68+ void fillIn (const llvm::Instruction *instruction, Node & node);
69+ void fillIn (const llvm::ReturnInst *instruction, Node & node);
70+ void fillIn (const llvm::BranchInst *instruction, Node & node);
71+ void fillIn (const llvm::SwitchInst *instruction, Node & node);
72+ void fillIn (const llvm::IndirectBrInst *instruction, Node & node);
73+ void fillIn (const llvm::InvokeInst *instruction, Node & node);
74+ void fillIn (const llvm::ResumeInst *instruction, Node & node);
75+ void fillIn (const llvm::UnreachableInst *instruction, Node & node);
76+ void fillIn (const llvm::CleanupReturnInst *instruction, Node & node);
77+ void fillIn (const llvm::CatchReturnInst *instruction, Node & node);
78+ void fillIn (const llvm::CatchSwitchInst *instruction, Node & node);
79+ void fillIn (const llvm::CallBrInst *instruction, Node & node);
80+ void fillIn (const llvm::UnaryOperator *instruction, Node & node);
81+ void fillIn (const llvm::BinaryOperator *instruction, Node & node);
82+ void fillIn (const llvm::AllocaInst *instruction, Node & node);
83+ void fillIn (const llvm::LoadInst *instruction, Node & node);
84+ void fillIn (const llvm::StoreInst *instruction, Node & node);
85+ void fillIn (const llvm::GetElementPtrInst *instruction, Node & node);
86+ void fillIn (const llvm::FenceInst *instruction, Node & node);
87+ void fillIn (const llvm::AtomicCmpXchgInst *instruction, Node & node);
88+ void fillIn (const llvm::AtomicRMWInst *instruction, Node & node);
89+ void fillIn (const llvm::TruncInst *instruction, Node & node);
90+ void fillIn (const llvm::ZExtInst *instruction, Node & node);
91+ void fillIn (const llvm::SExtInst *instruction, Node & node);
92+ void fillIn (const llvm::FPToUIInst *instruction, Node & node);
93+ void fillIn (const llvm::FPToSIInst *instruction, Node & node);
94+ void fillIn (const llvm::UIToFPInst *instruction, Node & node);
95+ void fillIn (const llvm::SIToFPInst *instruction, Node & node);
96+ void fillIn (const llvm::FPTruncInst *instruction, Node & node);
97+ void fillIn (const llvm::FPExtInst *instruction, Node & node);
98+ void fillIn (const llvm::PtrToIntInst *instruction, Node & node);
99+ void fillIn (const llvm::IntToPtrInst *instruction, Node & node);
100+ void fillIn (const llvm::BitCastInst *instruction, Node & node);
101+ void fillIn (const llvm::AddrSpaceCastInst *instruction, Node & node);
102+ void fillIn (const llvm::CleanupPadInst *instruction, Node & node);
103+ void fillIn (const llvm::CatchPadInst *instruction, Node & node);
104+ void fillIn (const llvm::ICmpInst *instruction, Node & node);
105+ void fillIn (const llvm::FCmpInst *instruction, Node & node);
106+ void fillIn (const llvm::PHINode *instruction, Node & node);
107+ void fillIn (const llvm::CallInst *instruction, Node & node);
108+ void fillIn (const llvm::SelectInst *instruction, Node & node);
109+ void fillIn (const llvm::VAArgInst *instruction, Node & node);
110+ void fillIn (const llvm::ExtractElementInst *instruction, Node & node);
111+ void fillIn (const llvm::InsertElementInst *instruction, Node & node);
112+ void fillIn (const llvm::ShuffleVectorInst *instruction, Node & node);
113+ void fillIn (const llvm::ExtractValueInst *instruction, Node & node);
114+ void fillIn (const llvm::InsertValueInst *instruction, Node & node);
115+ void fillIn (const llvm::LandingPadInst *instruction, Node & node);
114116};
115117
116118} // namespace llvm2graphml
0 commit comments