@@ -224,13 +224,51 @@ pub type SectionIteratorRef = *SectionIterator_opaque;
224
224
pub enum Pass_opaque { }
225
225
pub type PassRef = * Pass_opaque ;
226
226
227
+ pub mod debuginfo {
228
+ use core:: prelude:: * ;
229
+ use super :: { ValueRef } ;
230
+
231
+ pub enum DIBuilder_opaque { }
232
+ pub type DIBuilderRef = * DIBuilder_opaque ;
233
+
234
+ pub type DIDescriptor = ValueRef ;
235
+ pub type DIScope = DIDescriptor ;
236
+ pub type DILocation = DIDescriptor ;
237
+ pub type DIFile = DIScope ;
238
+ pub type DILexicalBlock = DIScope ;
239
+ pub type DISubprogram = DIScope ;
240
+ pub type DIType = DIDescriptor ;
241
+ pub type DIBasicType = DIType ;
242
+ pub type DIDerivedType = DIType ;
243
+ pub type DICompositeType = DIDerivedType ;
244
+ pub type DIVariable = DIDescriptor ;
245
+ pub type DIArray = DIDescriptor ;
246
+ pub type DISubrange = DIDescriptor ;
247
+
248
+ pub enum DIDescriptorFlags {
249
+ FlagPrivate = 1 << 0 ,
250
+ FlagProtected = 1 << 1 ,
251
+ FlagFwdDecl = 1 << 2 ,
252
+ FlagAppleBlock = 1 << 3 ,
253
+ FlagBlockByrefStruct = 1 << 4 ,
254
+ FlagVirtual = 1 << 5 ,
255
+ FlagArtificial = 1 << 6 ,
256
+ FlagExplicit = 1 << 7 ,
257
+ FlagPrototyped = 1 << 8 ,
258
+ FlagObjcClassComplete = 1 << 9 ,
259
+ FlagObjectPointer = 1 << 10 ,
260
+ FlagVector = 1 << 11 ,
261
+ FlagStaticMember = 1 << 12
262
+ }
263
+ }
264
+
227
265
pub mod llvm {
228
266
use super :: { AtomicBinOp , AtomicOrdering , BasicBlockRef , ExecutionEngineRef } ;
229
267
use super :: { Bool , BuilderRef , ContextRef , MemoryBufferRef , ModuleRef } ;
230
268
use super :: { ObjectFileRef , Opcode , PassManagerRef , PassManagerBuilderRef } ;
231
269
use super :: { SectionIteratorRef , TargetDataRef , TypeKind , TypeRef , UseRef } ;
232
- use super :: { ValueRef , PassRef } ;
233
-
270
+ use super :: { ValueRef , PassRef } ;
271
+ use super :: debuginfo :: * ;
234
272
use core:: libc:: { c_char, c_int, c_longlong, c_ushort, c_uint, c_ulonglong} ;
235
273
236
274
#[ link_args = "-Lrustllvm -lrustllvm" ]
@@ -1885,6 +1923,149 @@ pub mod llvm {
1885
1923
AlignStack : Bool , Dialect : c_uint )
1886
1924
-> ValueRef ;
1887
1925
1926
+
1927
+ #[ fast_ffi]
1928
+ pub unsafe fn DIBuilder_new ( M : ModuleRef ) -> DIBuilderRef ;
1929
+
1930
+ #[ fast_ffi]
1931
+ pub unsafe fn DIBuilder_delete ( Builder : DIBuilderRef ) ;
1932
+
1933
+ #[ fast_ffi]
1934
+ pub unsafe fn DIBuilder_finalize ( Builder : DIBuilderRef ) ;
1935
+
1936
+ #[ fast_ffi]
1937
+ pub unsafe fn DIBuilder_createCompileUnit (
1938
+ Builder : DIBuilderRef ,
1939
+ Lang : c_uint ,
1940
+ File : * c_char ,
1941
+ Dir : * c_char ,
1942
+ Producer : * c_char ,
1943
+ isOptimized : bool ,
1944
+ Flags : * c_char ,
1945
+ RuntimeVer : c_uint ,
1946
+ SplitName : * c_char ) ;
1947
+
1948
+ #[ fast_ffi]
1949
+ pub unsafe fn DIBuilder_createFile (
1950
+ Builder : DIBuilderRef ,
1951
+ Filename : * c_char ,
1952
+ Directory : * c_char ) -> DIFile ;
1953
+
1954
+ #[ fast_ffi]
1955
+ pub unsafe fn DIBuilder_createSubroutineType (
1956
+ Builder : DIBuilderRef ,
1957
+ File : DIFile ,
1958
+ ParameterTypes : DIArray ) -> DICompositeType ;
1959
+
1960
+ #[ fast_ffi]
1961
+ pub unsafe fn DIBuilder_createFunction (
1962
+ Builder : DIBuilderRef ,
1963
+ Scope : DIDescriptor ,
1964
+ Name : * c_char ,
1965
+ LinkageName : * c_char ,
1966
+ File : DIFile ,
1967
+ LineNo : c_uint ,
1968
+ Ty : DIType ,
1969
+ isLocalToUnit : bool ,
1970
+ isDefinition : bool ,
1971
+ ScopeLine : c_uint ,
1972
+ Flags : c_uint ,
1973
+ isOptimized : bool ,
1974
+ Fn : ValueRef ,
1975
+ TParam : ValueRef ,
1976
+ Decl : ValueRef ) -> DISubprogram ;
1977
+
1978
+ #[ fast_ffi]
1979
+ pub unsafe fn DIBuilder_createBasicType (
1980
+ Builder : DIBuilderRef ,
1981
+ Name : * c_char ,
1982
+ SizeInBits : c_ulonglong ,
1983
+ AlignInBits : c_ulonglong ,
1984
+ Encoding : c_uint ) -> DIBasicType ;
1985
+
1986
+ #[ fast_ffi]
1987
+ pub unsafe fn DIBuilder_createPointerType (
1988
+ Builder : DIBuilderRef ,
1989
+ PointeeTy : DIType ,
1990
+ SizeInBits : c_ulonglong ,
1991
+ AlignInBits : c_ulonglong ,
1992
+ Name : * c_char ) -> DIDerivedType ;
1993
+
1994
+ #[ fast_ffi]
1995
+ pub unsafe fn DIBuilder_createStructType (
1996
+ Builder : DIBuilderRef ,
1997
+ Scope : DIDescriptor ,
1998
+ Name : * c_char ,
1999
+ File : DIFile ,
2000
+ LineNumber : c_uint ,
2001
+ SizeInBits : c_ulonglong ,
2002
+ AlignInBits : c_ulonglong ,
2003
+ Flags : c_uint ,
2004
+ DerivedFrom : DIType ,
2005
+ Elements : DIArray ,
2006
+ RunTimeLang : c_uint ,
2007
+ VTableHolder : ValueRef ) -> DICompositeType ;
2008
+
2009
+ #[ fast_ffi]
2010
+ pub unsafe fn DIBuilder_createMemberType (
2011
+ Builder : DIBuilderRef ,
2012
+ Scope : DIDescriptor ,
2013
+ Name : * c_char ,
2014
+ File : DIFile ,
2015
+ LineNo : c_uint ,
2016
+ SizeInBits : c_ulonglong ,
2017
+ AlignInBits : c_ulonglong ,
2018
+ OffsetInBits : c_ulonglong ,
2019
+ Flags : c_uint ,
2020
+ Ty : DIType ) -> DIDerivedType ;
2021
+
2022
+ #[ fast_ffi]
2023
+ pub unsafe fn DIBuilder_createLexicalBlock (
2024
+ Builder : DIBuilderRef ,
2025
+ Scope : DIDescriptor ,
2026
+ File : DIFile ,
2027
+ Line : c_uint ,
2028
+ Col : c_uint ) -> DILexicalBlock ;
2029
+
2030
+ #[ fast_ffi]
2031
+ pub unsafe fn DIBuilder_createLocalVariable (
2032
+ Builder : DIBuilderRef ,
2033
+ Tag : c_uint ,
2034
+ Scope : DIDescriptor ,
2035
+ Name : * c_char ,
2036
+ File : DIFile ,
2037
+ LineNo : c_uint ,
2038
+ Ty : DIType ,
2039
+ AlwaysPreserve : bool ,
2040
+ Flags : c_uint ,
2041
+ ArgNo : c_uint ) -> DIVariable ;
2042
+
2043
+ #[ fast_ffi]
2044
+ pub unsafe fn DIBuilder_createVectorType (
2045
+ Builder : DIBuilderRef ,
2046
+ Size : c_ulonglong ,
2047
+ AlignInBits : c_ulonglong ,
2048
+ Ty : DIType ,
2049
+ Subscripts : DIArray ) -> DIType ;
2050
+
2051
+ #[ fast_ffi]
2052
+ pub unsafe fn DIBuilder_getOrCreateSubrange (
2053
+ Builder : DIBuilderRef ,
2054
+ Lo : c_longlong ,
2055
+ Count : c_longlong ) -> DISubrange ;
2056
+
2057
+ #[ fast_ffi]
2058
+ pub unsafe fn DIBuilder_getOrCreateArray (
2059
+ Builder : DIBuilderRef ,
2060
+ Ptr : * DIDescriptor ,
2061
+ Count : c_uint ) -> DIArray ;
2062
+
2063
+ #[ fast_ffi]
2064
+ pub unsafe fn DIBuilder_insertDeclare (
2065
+ Builder : DIBuilderRef ,
2066
+ Val : ValueRef ,
2067
+ VarInfo : DIVariable ,
2068
+ InsertBefore : * c_void ) -> * c_void ;
1888
2069
}
1889
2070
}
1890
2071
0 commit comments