@@ -224,13 +224,50 @@ 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 super :: { ValueRef } ;
229
+
230
+ pub enum DIBuilder_opaque { }
231
+ pub type DIBuilderRef = * DIBuilder_opaque ;
232
+
233
+ pub type DIDescriptor = ValueRef ;
234
+ pub type DIScope = DIDescriptor ;
235
+ pub type DILocation = DIDescriptor ;
236
+ pub type DIFile = DIScope ;
237
+ pub type DILexicalBlock = DIScope ;
238
+ pub type DISubprogram = DIScope ;
239
+ pub type DIType = DIDescriptor ;
240
+ pub type DIBasicType = DIType ;
241
+ pub type DIDerivedType = DIType ;
242
+ pub type DICompositeType = DIDerivedType ;
243
+ pub type DIVariable = DIDescriptor ;
244
+ pub type DIArray = DIDescriptor ;
245
+ pub type DISubrange = DIDescriptor ;
246
+
247
+ pub enum DIDescriptorFlags {
248
+ FlagPrivate = 1 << 0 ,
249
+ FlagProtected = 1 << 1 ,
250
+ FlagFwdDecl = 1 << 2 ,
251
+ FlagAppleBlock = 1 << 3 ,
252
+ FlagBlockByrefStruct = 1 << 4 ,
253
+ FlagVirtual = 1 << 5 ,
254
+ FlagArtificial = 1 << 6 ,
255
+ FlagExplicit = 1 << 7 ,
256
+ FlagPrototyped = 1 << 8 ,
257
+ FlagObjcClassComplete = 1 << 9 ,
258
+ FlagObjectPointer = 1 << 10 ,
259
+ FlagVector = 1 << 11 ,
260
+ FlagStaticMember = 1 << 12
261
+ }
262
+ }
263
+
227
264
pub mod llvm {
228
265
use super :: { AtomicBinOp , AtomicOrdering , BasicBlockRef , ExecutionEngineRef } ;
229
266
use super :: { Bool , BuilderRef , ContextRef , MemoryBufferRef , ModuleRef } ;
230
267
use super :: { ObjectFileRef , Opcode , PassManagerRef , PassManagerBuilderRef } ;
231
268
use super :: { SectionIteratorRef , TargetDataRef , TypeKind , TypeRef , UseRef } ;
232
- use super :: { ValueRef , PassRef } ;
233
-
269
+ use super :: { ValueRef , PassRef } ;
270
+ use super :: debuginfo :: * ;
234
271
use core:: libc:: { c_char, c_int, c_longlong, c_ushort, c_uint, c_ulonglong} ;
235
272
236
273
#[ link_args = "-Lrustllvm -lrustllvm" ]
@@ -929,6 +966,12 @@ pub mod llvm {
929
966
#[ fast_ffi]
930
967
pub unsafe fn LLVMDeleteBasicBlock ( BB : BasicBlockRef ) ;
931
968
969
+ #[ fast_ffi]
970
+ pub unsafe fn LLVMMoveBasicBlockAfter ( BB : BasicBlockRef , MoveAfter : BasicBlockRef ) ;
971
+
972
+ #[ fast_ffi]
973
+ pub unsafe fn LLVMMoveBasicBlockBefore ( BB : BasicBlockRef , MoveBefore : BasicBlockRef ) ;
974
+
932
975
/* Operations on instructions */
933
976
#[ fast_ffi]
934
977
pub unsafe fn LLVMGetInstructionParent ( Inst : ValueRef )
@@ -1885,6 +1928,164 @@ pub mod llvm {
1885
1928
AlignStack : Bool , Dialect : c_uint )
1886
1929
-> ValueRef ;
1887
1930
1931
+
1932
+ #[ fast_ffi]
1933
+ pub unsafe fn LLVMDIBuilderCreate ( M : ModuleRef ) -> DIBuilderRef ;
1934
+
1935
+ #[ fast_ffi]
1936
+ pub unsafe fn LLVMDIBuilderDispose ( Builder : DIBuilderRef ) ;
1937
+
1938
+ #[ fast_ffi]
1939
+ pub unsafe fn LLVMDIBuilderFinalize ( Builder : DIBuilderRef ) ;
1940
+
1941
+ #[ fast_ffi]
1942
+ pub unsafe fn LLVMDIBuilderCreateCompileUnit (
1943
+ Builder : DIBuilderRef ,
1944
+ Lang : c_uint ,
1945
+ File : * c_char ,
1946
+ Dir : * c_char ,
1947
+ Producer : * c_char ,
1948
+ isOptimized : bool ,
1949
+ Flags : * c_char ,
1950
+ RuntimeVer : c_uint ,
1951
+ SplitName : * c_char ) ;
1952
+
1953
+ #[ fast_ffi]
1954
+ pub unsafe fn LLVMDIBuilderCreateFile (
1955
+ Builder : DIBuilderRef ,
1956
+ Filename : * c_char ,
1957
+ Directory : * c_char ) -> DIFile ;
1958
+
1959
+ #[ fast_ffi]
1960
+ pub unsafe fn LLVMDIBuilderCreateSubroutineType (
1961
+ Builder : DIBuilderRef ,
1962
+ File : DIFile ,
1963
+ ParameterTypes : DIArray ) -> DICompositeType ;
1964
+
1965
+ #[ fast_ffi]
1966
+ pub unsafe fn LLVMDIBuilderCreateFunction (
1967
+ Builder : DIBuilderRef ,
1968
+ Scope : DIDescriptor ,
1969
+ Name : * c_char ,
1970
+ LinkageName : * c_char ,
1971
+ File : DIFile ,
1972
+ LineNo : c_uint ,
1973
+ Ty : DIType ,
1974
+ isLocalToUnit : bool ,
1975
+ isDefinition : bool ,
1976
+ ScopeLine : c_uint ,
1977
+ Flags : c_uint ,
1978
+ isOptimized : bool ,
1979
+ Fn : ValueRef ,
1980
+ TParam : ValueRef ,
1981
+ Decl : ValueRef ) -> DISubprogram ;
1982
+
1983
+ #[ fast_ffi]
1984
+ pub unsafe fn LLVMDIBuilderCreateBasicType (
1985
+ Builder : DIBuilderRef ,
1986
+ Name : * c_char ,
1987
+ SizeInBits : c_ulonglong ,
1988
+ AlignInBits : c_ulonglong ,
1989
+ Encoding : c_uint ) -> DIBasicType ;
1990
+
1991
+ #[ fast_ffi]
1992
+ pub unsafe fn LLVMDIBuilderCreatePointerType (
1993
+ Builder : DIBuilderRef ,
1994
+ PointeeTy : DIType ,
1995
+ SizeInBits : c_ulonglong ,
1996
+ AlignInBits : c_ulonglong ,
1997
+ Name : * c_char ) -> DIDerivedType ;
1998
+
1999
+ #[ fast_ffi]
2000
+ pub unsafe fn LLVMDIBuilderCreateStructType (
2001
+ Builder : DIBuilderRef ,
2002
+ Scope : DIDescriptor ,
2003
+ Name : * c_char ,
2004
+ File : DIFile ,
2005
+ LineNumber : c_uint ,
2006
+ SizeInBits : c_ulonglong ,
2007
+ AlignInBits : c_ulonglong ,
2008
+ Flags : c_uint ,
2009
+ DerivedFrom : DIType ,
2010
+ Elements : DIArray ,
2011
+ RunTimeLang : c_uint ,
2012
+ VTableHolder : ValueRef ) -> DICompositeType ;
2013
+
2014
+ #[ fast_ffi]
2015
+ pub unsafe fn LLVMDIBuilderCreateMemberType (
2016
+ Builder : DIBuilderRef ,
2017
+ Scope : DIDescriptor ,
2018
+ Name : * c_char ,
2019
+ File : DIFile ,
2020
+ LineNo : c_uint ,
2021
+ SizeInBits : c_ulonglong ,
2022
+ AlignInBits : c_ulonglong ,
2023
+ OffsetInBits : c_ulonglong ,
2024
+ Flags : c_uint ,
2025
+ Ty : DIType ) -> DIDerivedType ;
2026
+
2027
+ #[ fast_ffi]
2028
+ pub unsafe fn LLVMDIBuilderCreateLexicalBlock (
2029
+ Builder : DIBuilderRef ,
2030
+ Scope : DIDescriptor ,
2031
+ File : DIFile ,
2032
+ Line : c_uint ,
2033
+ Col : c_uint ) -> DILexicalBlock ;
2034
+
2035
+ #[ fast_ffi]
2036
+ pub unsafe fn LLVMDIBuilderCreateLocalVariable (
2037
+ Builder : DIBuilderRef ,
2038
+ Tag : c_uint ,
2039
+ Scope : DIDescriptor ,
2040
+ Name : * c_char ,
2041
+ File : DIFile ,
2042
+ LineNo : c_uint ,
2043
+ Ty : DIType ,
2044
+ AlwaysPreserve : bool ,
2045
+ Flags : c_uint ,
2046
+ ArgNo : c_uint ) -> DIVariable ;
2047
+
2048
+ #[ fast_ffi]
2049
+ pub unsafe fn LLVMDIBuilderCreateArrayType (
2050
+ Builder : DIBuilderRef ,
2051
+ Size : c_ulonglong ,
2052
+ AlignInBits : c_ulonglong ,
2053
+ Ty : DIType ,
2054
+ Subscripts : DIArray ) -> DIType ;
2055
+
2056
+ #[ fast_ffi]
2057
+ pub unsafe fn LLVMDIBuilderCreateVectorType (
2058
+ Builder : DIBuilderRef ,
2059
+ Size : c_ulonglong ,
2060
+ AlignInBits : c_ulonglong ,
2061
+ Ty : DIType ,
2062
+ Subscripts : DIArray ) -> DIType ;
2063
+
2064
+ #[ fast_ffi]
2065
+ pub unsafe fn LLVMDIBuilderGetOrCreateSubrange (
2066
+ Builder : DIBuilderRef ,
2067
+ Lo : c_longlong ,
2068
+ Count : c_longlong ) -> DISubrange ;
2069
+
2070
+ #[ fast_ffi]
2071
+ pub unsafe fn LLVMDIBuilderGetOrCreateArray (
2072
+ Builder : DIBuilderRef ,
2073
+ Ptr : * DIDescriptor ,
2074
+ Count : c_uint ) -> DIArray ;
2075
+
2076
+ #[ fast_ffi]
2077
+ pub unsafe fn LLVMDIBuilderInsertDeclareAtEnd (
2078
+ Builder : DIBuilderRef ,
2079
+ Val : ValueRef ,
2080
+ VarInfo : DIVariable ,
2081
+ InsertAtEnd : BasicBlockRef ) -> ValueRef ;
2082
+
2083
+ #[ fast_ffi]
2084
+ pub unsafe fn LLVMDIBuilderInsertDeclareBefore (
2085
+ Builder : DIBuilderRef ,
2086
+ Val : ValueRef ,
2087
+ VarInfo : DIVariable ,
2088
+ InsertBefore : ValueRef ) -> ValueRef ;
1888
2089
}
1889
2090
}
1890
2091
0 commit comments