diff options
| author | Josh Stone <jistone@redhat.com> | 2019-01-16 09:59:03 -0800 |
|---|---|---|
| committer | Josh Stone <jistone@redhat.com> | 2019-01-25 15:39:54 -0800 |
| commit | df0466d0bb807a7266cc8ac9931cd43b3e84b62e (patch) | |
| tree | 5e0ec889065b1aea33f6bf9630d8f70003816f46 /src/librustc_codegen_llvm/llvm/ffi.rs | |
| parent | bf669d1e3295bc688f71b8c91f48a6beaf895f67 (diff) | |
| download | rust-df0466d0bb807a7266cc8ac9931cd43b3e84b62e.tar.gz rust-df0466d0bb807a7266cc8ac9931cd43b3e84b62e.zip | |
Rebase to the llvm-project monorepo
The new git submodule src/llvm-project is a monorepo replacing src/llvm
and src/tools/{clang,lld,lldb}. This also serves as a rebase for these
projects to the new 8.x branch from trunk.
The src/llvm-emscripten fork is unchanged for now.
Diffstat (limited to 'src/librustc_codegen_llvm/llvm/ffi.rs')
| -rw-r--r-- | src/librustc_codegen_llvm/llvm/ffi.rs | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/src/librustc_codegen_llvm/llvm/ffi.rs b/src/librustc_codegen_llvm/llvm/ffi.rs index 11e34f600c2..853c1ff0047 100644 --- a/src/librustc_codegen_llvm/llvm/ffi.rs +++ b/src/librustc_codegen_llvm/llvm/ffi.rs @@ -2,7 +2,7 @@ use super::debuginfo::{ DIBuilder, DIDescriptor, DIFile, DILexicalBlock, DISubprogram, DIType, DIBasicType, DIDerivedType, DICompositeType, DIScope, DIVariable, DIGlobalVariableExpression, DIArray, DISubrange, DITemplateTypeParameter, DIEnumerator, - DINameSpace, DIFlags, + DINameSpace, DIFlags, DISPFlags, }; use libc::{c_uint, c_int, size_t, c_char}; @@ -591,6 +591,20 @@ pub mod debuginfo { const FlagMainSubprogram = (1 << 21); } } + + // These values **must** match with LLVMRustDISPFlags!! + bitflags! { + #[repr(C)] + #[derive(Default)] + pub struct DISPFlags: ::libc::uint32_t { + const SPFlagZero = 0; + const SPFlagVirtual = 1; + const SPFlagPureVirtual = 2; + const SPFlagLocalToUnit = (1 << 2); + const SPFlagDefinition = (1 << 3); + const SPFlagOptimized = (1 << 4); + } + } } extern { pub type ModuleBuffer; } @@ -1387,11 +1401,9 @@ extern "C" { File: &'a DIFile, LineNo: c_uint, Ty: &'a DIType, - isLocalToUnit: bool, - isDefinition: bool, ScopeLine: c_uint, Flags: DIFlags, - isOptimized: bool, + SPFlags: DISPFlags, Fn: &'a Value, TParam: &'a DIArray, Decl: Option<&'a DIDescriptor>) @@ -1529,7 +1541,7 @@ extern "C" { AlignInBits: u32, Elements: &'a DIArray, ClassType: &'a DIType, - IsFixed: bool) + IsScoped: bool) -> &'a DIType; pub fn LLVMRustDIBuilderCreateUnionType(Builder: &DIBuilder<'a>, |
