@@ -63,8 +63,9 @@ use libc::{c_uint, c_ushort, uint64_t, c_int, size_t, c_char};
63
63
use libc:: { c_longlong, c_ulonglong, c_void} ;
64
64
use debuginfo:: { DIBuilderRef , DIDescriptor ,
65
65
DIFile , DILexicalBlock , DISubprogram , DIType ,
66
- DIBasicType , DIDerivedType , DICompositeType ,
67
- DIVariable , DIGlobalVariable , DIArray , DISubrange } ;
66
+ DIBasicType , DIDerivedType , DICompositeType , DIScope ,
67
+ DIVariable , DIGlobalVariable , DIArray , DISubrange ,
68
+ DITemplateTypeParameter , DIEnumerator , DINameSpace } ;
68
69
69
70
pub mod archive_ro;
70
71
pub mod diagnostic;
@@ -442,6 +443,9 @@ pub type TypeRef = *mut Type_opaque;
442
443
pub enum Value_opaque { }
443
444
pub type ValueRef = * mut Value_opaque ;
444
445
#[ allow( missing_copy_implementations) ]
446
+ pub enum Metadata_opaque { }
447
+ pub type MetadataRef = * mut Metadata_opaque ;
448
+ #[ allow( missing_copy_implementations) ]
445
449
pub enum BasicBlock_opaque { }
446
450
pub type BasicBlockRef = * mut BasicBlock_opaque ;
447
451
#[ allow( missing_copy_implementations) ]
@@ -501,18 +505,19 @@ pub type InlineAsmDiagHandler = unsafe extern "C" fn(SMDiagnosticRef, *const c_v
501
505
502
506
pub mod debuginfo {
503
507
pub use self :: DIDescriptorFlags :: * ;
504
- use super :: { ValueRef } ;
508
+ use super :: { MetadataRef } ;
505
509
506
510
#[ allow( missing_copy_implementations) ]
507
511
pub enum DIBuilder_opaque { }
508
512
pub type DIBuilderRef = * mut DIBuilder_opaque ;
509
513
510
- pub type DIDescriptor = ValueRef ;
514
+ pub type DIDescriptor = MetadataRef ;
511
515
pub type DIScope = DIDescriptor ;
512
516
pub type DILocation = DIDescriptor ;
513
517
pub type DIFile = DIScope ;
514
518
pub type DILexicalBlock = DIScope ;
515
519
pub type DISubprogram = DIScope ;
520
+ pub type DINameSpace = DIScope ;
516
521
pub type DIType = DIDescriptor ;
517
522
pub type DIBasicType = DIType ;
518
523
pub type DIDerivedType = DIType ;
@@ -521,6 +526,8 @@ pub mod debuginfo {
521
526
pub type DIGlobalVariable = DIDescriptor ;
522
527
pub type DIArray = DIDescriptor ;
523
528
pub type DISubrange = DIDescriptor ;
529
+ pub type DIEnumerator = DIDescriptor ;
530
+ pub type DITemplateTypeParameter = DIDescriptor ;
524
531
525
532
#[ derive( Copy ) ]
526
533
pub enum DIDescriptorFlags {
@@ -1778,8 +1785,8 @@ extern {
1778
1785
Flags : c_uint ,
1779
1786
isOptimized : bool ,
1780
1787
Fn : ValueRef ,
1781
- TParam : ValueRef ,
1782
- Decl : ValueRef )
1788
+ TParam : DIArray ,
1789
+ Decl : DIDescriptor )
1783
1790
-> DISubprogram ;
1784
1791
1785
1792
pub fn LLVMDIBuilderCreateBasicType ( Builder : DIBuilderRef ,
@@ -1807,7 +1814,7 @@ extern {
1807
1814
DerivedFrom : DIType ,
1808
1815
Elements : DIArray ,
1809
1816
RunTimeLang : c_uint ,
1810
- VTableHolder : ValueRef ,
1817
+ VTableHolder : DIType ,
1811
1818
UniqueId : * const c_char )
1812
1819
-> DICompositeType ;
1813
1820
@@ -1824,25 +1831,25 @@ extern {
1824
1831
-> DIDerivedType ;
1825
1832
1826
1833
pub fn LLVMDIBuilderCreateLexicalBlock ( Builder : DIBuilderRef ,
1827
- Scope : DIDescriptor ,
1834
+ Scope : DIScope ,
1828
1835
File : DIFile ,
1829
1836
Line : c_uint ,
1830
1837
Col : c_uint )
1831
1838
-> DILexicalBlock ;
1832
1839
1833
1840
pub fn LLVMDIBuilderCreateStaticVariable ( Builder : DIBuilderRef ,
1834
- Context : DIDescriptor ,
1841
+ Context : DIScope ,
1835
1842
Name : * const c_char ,
1836
1843
LinkageName : * const c_char ,
1837
1844
File : DIFile ,
1838
1845
LineNo : c_uint ,
1839
1846
Ty : DIType ,
1840
1847
isLocalToUnit : bool ,
1841
1848
Val : ValueRef ,
1842
- Decl : ValueRef )
1849
+ Decl : DIDescriptor )
1843
1850
-> DIGlobalVariable ;
1844
1851
1845
- pub fn LLVMDIBuilderCreateLocalVariable ( Builder : DIBuilderRef ,
1852
+ pub fn LLVMDIBuilderCreateVariable ( Builder : DIBuilderRef ,
1846
1853
Tag : c_uint ,
1847
1854
Scope : DIDescriptor ,
1848
1855
Name : * const c_char ,
@@ -1851,6 +1858,8 @@ extern {
1851
1858
Ty : DIType ,
1852
1859
AlwaysPreserve : bool ,
1853
1860
Flags : c_uint ,
1861
+ AddrOps : * const i64 ,
1862
+ AddrOpsCount : c_uint ,
1854
1863
ArgNo : c_uint )
1855
1864
-> DIVariable ;
1856
1865
@@ -1881,79 +1890,80 @@ extern {
1881
1890
pub fn LLVMDIBuilderInsertDeclareAtEnd ( Builder : DIBuilderRef ,
1882
1891
Val : ValueRef ,
1883
1892
VarInfo : DIVariable ,
1893
+ AddrOps : * const i64 ,
1894
+ AddrOpsCount : c_uint ,
1884
1895
InsertAtEnd : BasicBlockRef )
1885
1896
-> ValueRef ;
1886
1897
1887
1898
pub fn LLVMDIBuilderInsertDeclareBefore ( Builder : DIBuilderRef ,
1888
1899
Val : ValueRef ,
1889
1900
VarInfo : DIVariable ,
1901
+ AddrOps : * const i64 ,
1902
+ AddrOpsCount : c_uint ,
1890
1903
InsertBefore : ValueRef )
1891
1904
-> ValueRef ;
1892
1905
1893
1906
pub fn LLVMDIBuilderCreateEnumerator ( Builder : DIBuilderRef ,
1894
1907
Name : * const c_char ,
1895
1908
Val : c_ulonglong )
1896
- -> ValueRef ;
1909
+ -> DIEnumerator ;
1897
1910
1898
1911
pub fn LLVMDIBuilderCreateEnumerationType ( Builder : DIBuilderRef ,
1899
- Scope : ValueRef ,
1912
+ Scope : DIScope ,
1900
1913
Name : * const c_char ,
1901
- File : ValueRef ,
1914
+ File : DIFile ,
1902
1915
LineNumber : c_uint ,
1903
1916
SizeInBits : c_ulonglong ,
1904
1917
AlignInBits : c_ulonglong ,
1905
- Elements : ValueRef ,
1906
- ClassType : ValueRef )
1907
- -> ValueRef ;
1918
+ Elements : DIArray ,
1919
+ ClassType : DIType )
1920
+ -> DIType ;
1908
1921
1909
1922
pub fn LLVMDIBuilderCreateUnionType ( Builder : DIBuilderRef ,
1910
- Scope : ValueRef ,
1923
+ Scope : DIScope ,
1911
1924
Name : * const c_char ,
1912
- File : ValueRef ,
1925
+ File : DIFile ,
1913
1926
LineNumber : c_uint ,
1914
1927
SizeInBits : c_ulonglong ,
1915
1928
AlignInBits : c_ulonglong ,
1916
1929
Flags : c_uint ,
1917
- Elements : ValueRef ,
1930
+ Elements : DIArray ,
1918
1931
RunTimeLang : c_uint ,
1919
1932
UniqueId : * const c_char )
1920
- -> ValueRef ;
1933
+ -> DIType ;
1921
1934
1922
1935
pub fn LLVMSetUnnamedAddr ( GlobalVar : ValueRef , UnnamedAddr : Bool ) ;
1923
1936
1924
1937
pub fn LLVMDIBuilderCreateTemplateTypeParameter ( Builder : DIBuilderRef ,
1925
- Scope : ValueRef ,
1938
+ Scope : DIScope ,
1926
1939
Name : * const c_char ,
1927
- Ty : ValueRef ,
1928
- File : ValueRef ,
1940
+ Ty : DIType ,
1941
+ File : DIFile ,
1929
1942
LineNo : c_uint ,
1930
1943
ColumnNo : c_uint )
1931
- -> ValueRef ;
1932
-
1933
- pub fn LLVMDIBuilderCreateOpDeref ( IntType : TypeRef ) -> ValueRef ;
1944
+ -> DITemplateTypeParameter ;
1934
1945
1935
- pub fn LLVMDIBuilderCreateOpPlus ( IntType : TypeRef ) -> ValueRef ;
1946
+ pub fn LLVMDIBuilderCreateOpDeref ( ) -> i64 ;
1936
1947
1937
- pub fn LLVMDIBuilderCreateComplexVariable ( Builder : DIBuilderRef ,
1938
- Tag : c_uint ,
1939
- Scope : ValueRef ,
1940
- Name : * const c_char ,
1941
- File : ValueRef ,
1942
- LineNo : c_uint ,
1943
- Ty : ValueRef ,
1944
- AddrOps : * const ValueRef ,
1945
- AddrOpsCount : c_uint ,
1946
- ArgNo : c_uint )
1947
- -> ValueRef ;
1948
+ pub fn LLVMDIBuilderCreateOpPlus ( ) -> i64 ;
1948
1949
1949
1950
pub fn LLVMDIBuilderCreateNameSpace ( Builder : DIBuilderRef ,
1950
- Scope : ValueRef ,
1951
+ Scope : DIScope ,
1951
1952
Name : * const c_char ,
1952
- File : ValueRef ,
1953
+ File : DIFile ,
1953
1954
LineNo : c_uint )
1954
- -> ValueRef ;
1955
+ -> DINameSpace ;
1956
+
1957
+ pub fn LLVMDIBuilderCreateDebugLocation ( Context : ContextRef ,
1958
+ Line : c_uint ,
1959
+ Column : c_uint ,
1960
+ Scope : DIScope ,
1961
+ InlinedAt : MetadataRef )
1962
+ -> ValueRef ;
1955
1963
1956
- pub fn LLVMDICompositeTypeSetTypeArray ( CompositeType : ValueRef , TypeArray : ValueRef ) ;
1964
+ pub fn LLVMDICompositeTypeSetTypeArray ( Builder : DIBuilderRef ,
1965
+ CompositeType : DIType ,
1966
+ TypeArray : DIArray ) ;
1957
1967
pub fn LLVMWriteTypeToString ( Type : TypeRef , s : RustStringRef ) ;
1958
1968
pub fn LLVMWriteValueToString ( value_ref : ValueRef , s : RustStringRef ) ;
1959
1969
0 commit comments