rust/compiler/rustc_llvm
bors 1e37ba76d4 Auto merge of #78531 - cuviper:unwrap-metadata, r=tmandry
rustc_llvm: unwrap LLVMMetadataRef before casting

Directly casting the opaque pointer was [reported] to cause an
"incomplete type" error with GCC 9.3:

```
llvm-wrapper/RustWrapper.cpp:939:31:   required from here
/usr/include/c++/9.3/type_traits:1301:12: error: invalid use of incomplete type 'struct LLVMOpaqueMetadata'
 1301 |     struct is_base_of
      |            ^~~~~~~~~~
In file included from [...]/rust/src/llvm-project/llvm/include/llvm-c/BitReader.h:23,
                 from llvm-wrapper/LLVMWrapper.h:1,
                 from llvm-wrapper/RustWrapper.cpp:1:
[...]/rust/src/llvm-project/llvm/include/llvm-c/Types.h:89:16: note: forward declaration of 'struct LLVMOpaqueMetadata'
   89 | typedef struct LLVMOpaqueMetadata *LLVMMetadataRef;
      |                ^~~~~~~~~~~~~~~~~~
```

[reported]: https://zulip-archive.rust-lang.org/182449tcompilerhelp/12215halprustcllvmbuildfail.html#214915124

A simple `unwrap` fixes the issue.

r? `@eddyb`
2020-11-01 09:30:11 +00:00
..
llvm-wrapper Auto merge of #78531 - cuviper:unwrap-metadata, r=tmandry 2020-11-01 09:30:11 +00:00
src Remove unused #[allow(...)] statements from compiler/ 2020-09-26 01:25:55 +02:00
build.rs Simplify some code in rustc_llvm/build.rs now that LLVM 8 is required 2020-10-08 06:19:06 +02:00
Cargo.toml Update cc crate to understand aarch64-apple-darwin with clang 2020-09-18 09:22:07 -04:00