diff options
author | Fangrui Song <i@maskray.me> | 2020-12-11 12:45:22 -0800 |
---|---|---|
committer | Fangrui Song <i@maskray.me> | 2020-12-11 12:45:22 -0800 |
commit | b5ad32ef5c68c8c6ebf16f1955ea884421b3750e (patch) | |
tree | a4d0ea4292944cce59fdf5a8d29199722889cbf3 /llvm/lib/CodeGen/SafeStack.cpp | |
parent | 7ea37d2f9449320baf3f3c96f2ea8b2d002a9ceb (diff) | |
download | llvm-b5ad32ef5c68c8c6ebf16f1955ea884421b3750e.zip llvm-b5ad32ef5c68c8c6ebf16f1955ea884421b3750e.tar.gz llvm-b5ad32ef5c68c8c6ebf16f1955ea884421b3750e.tar.bz2 |
Migrate deprecated DebugLoc::get to DILocation::get
This migrates all LLVM (except Kaleidoscope and
CodeGen/StackProtector.cpp) DebugLoc::get to DILocation::get.
The CodeGen/StackProtector.cpp usage may have a nullptr Scope
and can trigger an assertion failure, so I don't migrate it.
Reviewed By: #debug-info, dblaikie
Differential Revision: https://reviews.llvm.org/D93087
Diffstat (limited to 'llvm/lib/CodeGen/SafeStack.cpp')
-rw-r--r-- | llvm/lib/CodeGen/SafeStack.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/SafeStack.cpp b/llvm/lib/CodeGen/SafeStack.cpp index 52d3178..3179763 100644 --- a/llvm/lib/CodeGen/SafeStack.cpp +++ b/llvm/lib/CodeGen/SafeStack.cpp @@ -789,7 +789,8 @@ bool SafeStack::run() { // Calls must always have a debug location, or else inlining breaks. So // we explicitly set a artificial debug location here. if (DISubprogram *SP = F.getSubprogram()) - IRB.SetCurrentDebugLocation(DebugLoc::get(SP->getScopeLine(), 0, SP)); + IRB.SetCurrentDebugLocation( + DILocation::get(SP->getContext(), SP->getScopeLine(), 0, SP)); if (SafeStackUsePointerAddress) { FunctionCallee Fn = F.getParent()->getOrInsertFunction( "__safestack_pointer_address", StackPtrTy->getPointerTo(0)); |