aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Frontend/CreateInvocationFromCommandLine.cpp
diff options
context:
space:
mode:
authorMarco Elver <elver@google.com>2022-05-05 15:21:35 +0200
committerMarco Elver <elver@google.com>2022-05-05 15:21:35 +0200
commit47bdea3f7eb4bb70288e69635d73807c5d03dacc (patch)
tree93dbd4f6b1b3a5c6453cddd83dff6d76ebad390e /clang/lib/Frontend/CreateInvocationFromCommandLine.cpp
parent40c13720a4b977d4347bbde53c52a4d0703823c2 (diff)
downloadllvm-47bdea3f7eb4bb70288e69635d73807c5d03dacc.zip
llvm-47bdea3f7eb4bb70288e69635d73807c5d03dacc.tar.gz
llvm-47bdea3f7eb4bb70288e69635d73807c5d03dacc.tar.bz2
[ThreadSanitizer] Add fallback DebugLocation for instrumentation calls
When building with debug info enabled, some load/store instructions do not have a DebugLocation attached. When using the default IRBuilder, it attempts to copy the DebugLocation from the insertion-point instruction. When there's no DebugLocation, no attempt is made to add one. This is problematic for inserted calls, where the enclosing function has debug info but the call ends up without a DebugLocation in e.g. LTO builds that verify that both the enclosing function and calls to inlinable functions have debug info attached. This issue was noticed in Linux kernel KCSAN builds with LTO and debug info enabled: | ... | inlinable function call in a function with debug info must have a !dbg location | call void @__tsan_read8(i8* %432) | ... To fix, ensure that all calls to the runtime have a DebugLocation attached, where the possibility exists that the insertion-point might not have any DebugLocation attached to it. Reviewed By: nickdesaulniers Differential Revision: https://reviews.llvm.org/D124937
Diffstat (limited to 'clang/lib/Frontend/CreateInvocationFromCommandLine.cpp')
0 files changed, 0 insertions, 0 deletions