about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src/attributes.rs
diff options
context:
space:
mode:
authorTri Vo <trong@google.com>2021-01-22 18:32:38 -0800
committerTri Vo <trong@google.com>2021-02-07 23:48:58 -0800
commitc7d9bffe76477a2f79c468b07e5eaf82525eea99 (patch)
treeaddcee2a27c0041b9ba694a78d84ec30d86a1e19 /compiler/rustc_codegen_llvm/src/attributes.rs
parent0b7a598e12649d7ab2415a82cbc3fea879fa9dab (diff)
downloadrust-c7d9bffe76477a2f79c468b07e5eaf82525eea99.tar.gz
rust-c7d9bffe76477a2f79c468b07e5eaf82525eea99.zip
HWASan support
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/attributes.rs')
-rw-r--r--compiler/rustc_codegen_llvm/src/attributes.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/compiler/rustc_codegen_llvm/src/attributes.rs b/compiler/rustc_codegen_llvm/src/attributes.rs
index a78d692aaa7..26111729ba5 100644
--- a/compiler/rustc_codegen_llvm/src/attributes.rs
+++ b/compiler/rustc_codegen_llvm/src/attributes.rs
@@ -53,6 +53,9 @@ pub fn sanitize(cx: &CodegenCx<'ll, '_>, no_sanitize: SanitizerSet, llfn: &'ll V
     if enabled.contains(SanitizerSet::THREAD) {
         llvm::Attribute::SanitizeThread.apply_llfn(Function, llfn);
     }
+    if enabled.contains(SanitizerSet::HWADDRESS) {
+        llvm::Attribute::SanitizeHWAddress.apply_llfn(Function, llfn);
+    }
 }
 
 /// Tell LLVM to emit or not emit the information necessary to unwind the stack for the function.