diff options
| author | Tri Vo <trong@google.com> | 2021-01-22 18:32:38 -0800 |
|---|---|---|
| committer | Tri Vo <trong@google.com> | 2021-02-07 23:48:58 -0800 |
| commit | c7d9bffe76477a2f79c468b07e5eaf82525eea99 (patch) | |
| tree | addcee2a27c0041b9ba694a78d84ec30d86a1e19 /compiler/rustc_codegen_llvm/src/llvm | |
| parent | 0b7a598e12649d7ab2415a82cbc3fea879fa9dab (diff) | |
| download | rust-c7d9bffe76477a2f79c468b07e5eaf82525eea99.tar.gz rust-c7d9bffe76477a2f79c468b07e5eaf82525eea99.zip | |
HWASan support
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/llvm')
| -rw-r--r-- | compiler/rustc_codegen_llvm/src/llvm/ffi.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/compiler/rustc_codegen_llvm/src/llvm/ffi.rs b/compiler/rustc_codegen_llvm/src/llvm/ffi.rs index e82198f8f0c..8c1740d8f25 100644 --- a/compiler/rustc_codegen_llvm/src/llvm/ffi.rs +++ b/compiler/rustc_codegen_llvm/src/llvm/ffi.rs @@ -131,6 +131,7 @@ pub enum Attribute { ReturnsTwice = 25, ReadNone = 26, InaccessibleMemOnly = 27, + SanitizeHWAddress = 28, } /// LLVMIntPredicate @@ -439,6 +440,8 @@ pub struct SanitizerOptions { pub sanitize_memory_recover: bool, pub sanitize_memory_track_origins: c_int, pub sanitize_thread: bool, + pub sanitize_hwaddress: bool, + pub sanitize_hwaddress_recover: bool, } /// LLVMRelocMode @@ -2128,6 +2131,7 @@ extern "C" { Recover: bool, ) -> &'static mut Pass; pub fn LLVMRustCreateThreadSanitizerPass() -> &'static mut Pass; + pub fn LLVMRustCreateHWAddressSanitizerPass(Recover: bool) -> &'static mut Pass; pub fn LLVMRustAddPass(PM: &PassManager<'_>, Pass: &'static mut Pass); pub fn LLVMRustAddLastExtensionPasses( PMB: &PassManagerBuilder, |
