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

Method createTopLevelEntities

asm/module.go:111–134  ·  view source on GitHub ↗

=== [ Create and index IR ] ================================================= createTopLevelEntities indexes IR top-level identifiers and creates scaffolding IR top-level declarations and definitions (without bodies but with types) of the given module.

()

Source from the content-addressed store, hash-verified

109// scaffolding IR top-level declarations and definitions (without bodies but
110// with types) of the given module.
111func (gen *generator) createTopLevelEntities() error {
112 // 4a. Index top-level identifiers and create scaffolding IR top-level
113 // declarations and definitions (without bodies but with types).
114 //
115 // Note: the substeps of 4a can be done concurrently.
116 //
117 // 4a1. Index global identifiers and create scaffolding IR global
118 // declarations and definitions, indirect symbol definitions (aliases
119 // and indirect functions), and function declarations and definitions
120 // (without bodies but with types).
121 if err := gen.createGlobalEntities(); err != nil {
122 return errors.WithStack(err)
123 }
124 // 4a2. Index attribute group IDs and create scaffolding IR attribute group
125 // definitions (without bodies).
126 gen.createAttrGroupDefs()
127 // 4a3. Index metadata names and create scaffolding IR named metadata
128 // definitions (without bodies).
129 gen.createNamedMetadataDefs()
130 // 4a4. Index metadata IDs and create scaffolding IR metadata definitions
131 // (without bodies).
132 gen.createMetadataDefs()
133 return nil
134}
135
136// --- [ Attribute group definitions ] -----------------------------------------
137

Callers 1

translateFunction · 0.80

Calls 4

createGlobalEntitiesMethod · 0.95
createAttrGroupDefsMethod · 0.95
createMetadataDefsMethod · 0.95

Tested by

no test coverage detected