@@ -564,12 +564,12 @@ pub enum ArchiveKind {
564564}
565565
566566// LLVMRustThinLTOData
567- extern "C" {
567+ unsafe extern "C" {
568568 pub type ThinLTOData ;
569569}
570570
571571// LLVMRustThinLTOBuffer
572- extern "C" {
572+ unsafe extern "C" {
573573 pub type ThinLTOBuffer ;
574574}
575575
@@ -621,7 +621,7 @@ pub enum MemoryEffects {
621621 InaccessibleMemOnly ,
622622}
623623
624- extern "C" {
624+ unsafe extern "C" {
625625 type Opaque ;
626626}
627627#[ repr( C ) ]
@@ -631,54 +631,54 @@ struct InvariantOpaque<'a> {
631631}
632632
633633// Opaque pointer types
634- extern "C" {
634+ unsafe extern "C" {
635635 pub type Module ;
636636}
637- extern "C" {
637+ unsafe extern "C" {
638638 pub type Context ;
639639}
640- extern "C" {
640+ unsafe extern "C" {
641641 pub type Type ;
642642}
643- extern "C" {
643+ unsafe extern "C" {
644644 pub type Value ;
645645}
646- extern "C" {
646+ unsafe extern "C" {
647647 pub type ConstantInt ;
648648}
649- extern "C" {
649+ unsafe extern "C" {
650650 pub type Attribute ;
651651}
652- extern "C" {
652+ unsafe extern "C" {
653653 pub type Metadata ;
654654}
655- extern "C" {
655+ unsafe extern "C" {
656656 pub type BasicBlock ;
657657}
658658#[ repr( C ) ]
659659pub struct Builder < ' a > ( InvariantOpaque < ' a > ) ;
660660#[ repr( C ) ]
661661pub struct PassManager < ' a > ( InvariantOpaque < ' a > ) ;
662- extern "C" {
662+ unsafe extern "C" {
663663 pub type Pass ;
664664}
665- extern "C" {
665+ unsafe extern "C" {
666666 pub type TargetMachine ;
667667}
668- extern "C" {
668+ unsafe extern "C" {
669669 pub type Archive ;
670670}
671671#[ repr( C ) ]
672672pub struct ArchiveIterator < ' a > ( InvariantOpaque < ' a > ) ;
673673#[ repr( C ) ]
674674pub struct ArchiveChild < ' a > ( InvariantOpaque < ' a > ) ;
675- extern "C" {
675+ unsafe extern "C" {
676676 pub type Twine ;
677677}
678- extern "C" {
678+ unsafe extern "C" {
679679 pub type DiagnosticInfo ;
680680}
681- extern "C" {
681+ unsafe extern "C" {
682682 pub type SMDiagnostic ;
683683}
684684#[ repr( C ) ]
@@ -688,7 +688,7 @@ pub struct OperandBundleDef<'a>(InvariantOpaque<'a>);
688688#[ repr( C ) ]
689689pub struct Linker < ' a > ( InvariantOpaque < ' a > ) ;
690690
691- extern "C" {
691+ unsafe extern "C" {
692692 pub type DiagnosticHandler ;
693693}
694694
@@ -823,7 +823,7 @@ bitflags! {
823823 }
824824}
825825
826- extern "C" {
826+ unsafe extern "C" {
827827 pub type ModuleBuffer ;
828828}
829829
@@ -834,7 +834,7 @@ pub type SelfProfileAfterPassCallback = unsafe extern "C" fn(*mut c_void);
834834pub type GetSymbolsCallback = unsafe extern "C" fn ( * mut c_void , * const c_char ) -> * mut c_void ;
835835pub type GetSymbolsErrorCallback = unsafe extern "C" fn ( * const c_char ) -> * mut c_void ;
836836
837- extern "C" {
837+ unsafe extern "C" {
838838 // Create and destroy contexts.
839839 pub fn LLVMContextDispose ( C : & ' static mut Context ) ;
840840 pub fn LLVMGetMDKindIDInContext ( C : & Context , Name : * const c_char , SLen : c_uint ) -> c_uint ;
@@ -1518,7 +1518,7 @@ extern "C" {
15181518}
15191519
15201520#[ link( name = "llvm-wrapper" , kind = "static" ) ]
1521- extern "C" {
1521+ unsafe extern "C" {
15221522 pub fn LLVMRustInstallErrorHandlers ( ) ;
15231523 pub fn LLVMRustDisableSystemDialogsOnCrash ( ) ;
15241524
0 commit comments