Brian Silverman | 4e662aa | 2022-05-11 23:10:19 -0700 | [diff] [blame^] | 1 | // Copyright 2022 Google LLC |
| 2 | // |
| 3 | // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or |
| 4 | // https://www.apache.org/licenses/LICENSE-2.0> or the MIT license |
| 5 | // <LICENSE-MIT or https://opensource.org/licenses/MIT>, at your |
| 6 | // option. This file may not be copied, modified, or distributed |
| 7 | // except according to those terms. |
| 8 | |
| 9 | use autocxx::prelude::*; // use all the main autocxx functions |
| 10 | |
| 11 | include_cpp! { |
| 12 | #include "llvm/Support/MemoryBuffer.h" |
| 13 | safety!(unsafe) |
| 14 | generate!("llvm::MemoryBuffer") |
| 15 | } |
| 16 | |
| 17 | // Simply re-export the MemoryBuffer API to users of this library. |
| 18 | // Generally speaking, the APIs generated by autocxx (or similar tools) |
| 19 | // still contain C++-isms, and it's wise to consider making idiomatic |
| 20 | // Rust wrappers instead of doing this. |
| 21 | pub use ffi::llvm::MemoryBuffer; |
| 22 | |
| 23 | // It would be advisable to add tests here. |