MCPcopy Create free account
hub / github.com/llir/llvm / addDefsToModule

Method addDefsToModule

asm/translate.go:167–187  ·  view source on GitHub ↗

addDefsToModule adds IR top-level declarations and definitions to the IR module in order of occurrence in the input.

()

Source from the content-addressed store, hash-verified

165// addDefsToModule adds IR top-level declarations and definitions to the IR
166// module in order of occurrence in the input.
167func (gen *generator) addDefsToModule() {
168 // 8. Add IR top-level declarations and definitions to the IR module in order
169 // of occurrence in the input.
170 //
171 // Note: the substeps of 8 can be done concurrently.
172 //
173 // 8a. Add IR type definitions to the IR module in natural sorting order.
174 gen.addTypeDefsToModule()
175 // 8b. Add IR comdat definitions to the IR module in natural sorting order.
176 gen.addComdatDefsToModule()
177 // 8c. Add IR global variable declarations and definitions, indirect symbol
178 // definitions, and function declarations and definitions to the IR
179 // module in order of occurrence in the input.
180 gen.addGlobalEntitiesToModule()
181 // 8d. Add IR attribute group definitions to the IR module in numeric order.
182 gen.addAttrGroupDefsToModule()
183 // 8e. Add IR named metadata definitions to the IR module.
184 gen.addNamedMetadataDefsToModule()
185 // 8f. Add IR metadata definitions to the IR module in numeric order.
186 gen.addMetadataDefsToModule()
187}
188
189// addTypeDefsToModule adds IR type definitions to the IR module in natural
190// sorting order.

Callers 1

translateFunction · 0.80

Tested by

no test coverage detected