[PATCH] D51075: [SafeStack] Set debug location for calls to __safestack_pointer_address.
Evgenii Stepanov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 21 17:05:49 PDT 2018
eugenis added inline comments.
================
Comment at: lib/CodeGen/SafeStack.cpp:781
+ if (DISubprogram *Subprogram = F.getSubprogram())
+ IRB.SetCurrentDebugLocation(
+ DILocation::get(F.getContext(), 0, 0, Subprogram));
----------------
Should this be checked in module verifier?
================
Comment at: lib/CodeGen/SafeStack.cpp:782
+ IRB.SetCurrentDebugLocation(
+ DILocation::get(F.getContext(), 0, 0, Subprogram));
if (SafeStackUsePointerAddress) {
----------------
In ASan we do this:
if (auto SP = F.getSubprogram())
EntryDebugLocation = DebugLoc::get(SP->getScopeLine(), 0, SP);
Is that better? I think it will point to the opening curling bracket of the function instead of line 0.
Repository:
rL LLVM
https://reviews.llvm.org/D51075
More information about the llvm-commits
mailing list