@@ -89,10 +89,10 @@ public static void Main( string[] args )
89
89
90
90
#region CreatingBasicTypesWithDebugInfo
91
91
// Create basic types used in this compilation
92
- var i32 = new DebugBasicType ( module . Context . Int32Type , in diBuilder , "int" , DiTypeKind . Signed ) ;
93
- var f32 = new DebugBasicType ( module . Context . FloatType , in diBuilder , "float" , DiTypeKind . Float ) ;
92
+ var i32 = new DebugBasicType ( module . Context . Int32Type , diBuilder , "int" , DiTypeKind . Signed ) ;
93
+ var f32 = new DebugBasicType ( module . Context . FloatType , diBuilder , "float" , DiTypeKind . Float ) ;
94
94
var voidType = DebugType . Create ( module . Context . VoidType , ( DIType ? ) null ) ;
95
- var i32Array_0_32 = i32 . CreateArrayType ( in diBuilder , 0 , 32 ) ;
95
+ var i32Array_0_32 = i32 . CreateArrayType ( diBuilder , 0 , 32 ) ;
96
96
#endregion
97
97
98
98
#region CreatingStructureTypes
@@ -104,7 +104,7 @@ public static void Main( string[] args )
104
104
new ( 2 , "c" , diFile , 5 , i32Array_0_32 ) ,
105
105
} ;
106
106
107
- var fooType = new DebugStructType ( in diBuilder , "struct.foo" , compilationUnit , "foo" , diFile , 1 , DebugInfoFlags . None , fooBody ) ;
107
+ var fooType = new DebugStructType ( diBuilder , "struct.foo" , compilationUnit , "foo" , diFile , 1 , DebugInfoFlags . None , fooBody ) ;
108
108
#endregion
109
109
110
110
#region CreatingGlobalsAndMetadata
@@ -133,17 +133,17 @@ public static void Main( string[] args )
133
133
#region CreatingQualifiedTypes
134
134
// create types for function args
135
135
var constFoo = diBuilder . CreateQualifiedType ( fooType . DebugInfoType , QualifiedTypeTag . Const ) ;
136
- var fooPtr = new DebugPointerType ( fooType , in diBuilder ) ;
136
+ var fooPtr = new DebugPointerType ( fooType , diBuilder ) ;
137
137
#endregion
138
138
139
139
// Create the functions
140
140
// NOTE: The declaration ordering is reversed from that of the sample code file (test.c)
141
141
// However, this is what Clang ends up doing for some reason so it is
142
142
// replicated here to aid in comparing the generated LL files.
143
- Function doCopyFunc = DeclareDoCopyFunc ( in diBuilder , diFile , voidType , abiAttributes ) ;
144
- Function copyFunc = DeclareCopyFunc ( targetABI , in diBuilder , diFile , voidType , constFoo , fooPtr , abiAttributes ) ;
143
+ Function doCopyFunc = DeclareDoCopyFunc ( diBuilder , diFile , voidType , abiAttributes ) ;
144
+ Function copyFunc = DeclareCopyFunc ( targetABI , diBuilder , diFile , voidType , constFoo , fooPtr , abiAttributes ) ;
145
145
146
- CreateCopyFunctionBody ( in diBuilder , copyFunc , diFile , fooType , fooPtr , constFoo ) ;
146
+ CreateCopyFunctionBody ( diBuilder , copyFunc , diFile , fooType , fooPtr , constFoo ) ;
147
147
CreateDoCopyFunctionBody ( module , doCopyFunc , fooType , bar , baz , copyFunc ) ;
148
148
149
149
// finalize the debug information
@@ -185,16 +185,16 @@ private static void ShowUsage( )
185
185
186
186
#region FunctionDeclarations
187
187
private static Function DeclareDoCopyFunc (
188
- ref readonly DIBuilder diBuilder ,
188
+ DIBuilder diBuilder ,
189
189
DIFile diFile ,
190
190
IDebugType < ITypeRef , DIType > voidType ,
191
191
IEnumerable < AttributeValue > abiAttributes
192
192
)
193
193
{
194
194
var module = diBuilder . OwningModule ;
195
- var doCopySig = module . Context . CreateFunctionType ( in diBuilder , voidType ) ;
195
+ var doCopySig = module . Context . CreateFunctionType ( diBuilder , voidType ) ;
196
196
197
- var doCopyFunc = module . CreateFunction ( in diBuilder
197
+ var doCopyFunc = module . CreateFunction ( diBuilder
198
198
, scope : diFile
199
199
, name : "DoCopy"
200
200
, linkageName : null
@@ -212,7 +212,7 @@ IEnumerable<AttributeValue> abiAttributes
212
212
}
213
213
214
214
private static Function DeclareCopyFunc ( ITargetABI abi
215
- , ref readonly DIBuilder diBuilder
215
+ , DIBuilder diBuilder
216
216
, DIFile diFile
217
217
, IDebugType < ITypeRef , DIType > voidType
218
218
, DIDerivedType constFoo
@@ -230,13 +230,13 @@ private static Function DeclareCopyFunc( ITargetABI abi
230
230
// To get the correct debug info signature this inserts an
231
231
// explicit DebugType<> that overrides the default behavior
232
232
// to pair the LLVM pointer type with the original source type.
233
- var copySig = module . Context . CreateFunctionType ( in diBuilder
233
+ var copySig = module . Context . CreateFunctionType ( diBuilder
234
234
, voidType
235
235
, DebugType . Create ( fooPtr , constFoo )
236
236
, fooPtr
237
237
) ;
238
238
239
- var copyFunc = module . CreateFunction ( in diBuilder
239
+ var copyFunc = module . CreateFunction ( diBuilder
240
240
, scope : diFile
241
241
, name : "copy"
242
242
, linkageName : null
@@ -268,7 +268,7 @@ private static void AddModuleFlags( ITargetABI abi, Module module, ILibLlvm libr
268
268
}
269
269
#endregion
270
270
271
- private static void CreateCopyFunctionBody ( ref readonly DIBuilder diBuilder
271
+ private static void CreateCopyFunctionBody ( DIBuilder diBuilder
272
272
, Function copyFunc
273
273
, DIFile diFile
274
274
, ITypeRef foo
0 commit comments