[PATCH] D74369: [AddressSanitizer] Ensure only AllocaInst is passed to dbg.declare

Adrian Prantl via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 11 09:45:35 PST 2020


aprantl added a comment.

This part of the patch LGTM.



================
Comment at: llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp:3123
   // Replace Alloca instructions with base+offset.
+  Value *LocalStackBaseAllocaPtr =
+      isa<PtrToIntInst>(LocalStackBaseAlloca)
----------------
`// The ptrtoint operation is transparent to the debug info and only confuses later passes.`


================
Comment at: llvm/test/DebugInfo/X86/asan_debug_info.ll:3
+; RUN:   llc -O0 -filetype=obj - -o - | \
+; RUN:   llvm-dwarfdump - | FileCheck %s
+
----------------
While having an end-to-end test is great, I wonder if we should also have an IR->IR test that just specifies the ASAN transform's expected behavior.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D74369/new/

https://reviews.llvm.org/D74369





More information about the llvm-commits mailing list