aboutsummaryrefslogtreecommitdiff
path: root/llvm/docs/tutorial/MyFirstLanguageFrontend
diff options
context:
space:
mode:
authorFangrui Song <i@maskray.me>2020-12-15 14:17:04 -0800
committerFangrui Song <i@maskray.me>2020-12-15 14:17:04 -0800
commit8c4e55762d8b7a07546a5db18e33ccc6a9d97002 (patch)
treeccc1fdfbb2ba9418a493d82cdc447f162cf9ae24 /llvm/docs/tutorial/MyFirstLanguageFrontend
parent71601d2ac9954cb59c443cb3ae442cb106df35d4 (diff)
downloadllvm-8c4e55762d8b7a07546a5db18e33ccc6a9d97002.zip
llvm-8c4e55762d8b7a07546a5db18e33ccc6a9d97002.tar.gz
llvm-8c4e55762d8b7a07546a5db18e33ccc6a9d97002.tar.bz2
[docs][unittest][Go][StackProtector] Migrate deprecated DebugInfo::get to DILocation::get
Diffstat (limited to 'llvm/docs/tutorial/MyFirstLanguageFrontend')
-rw-r--r--llvm/docs/tutorial/MyFirstLanguageFrontend/LangImpl09.rst4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/docs/tutorial/MyFirstLanguageFrontend/LangImpl09.rst b/llvm/docs/tutorial/MyFirstLanguageFrontend/LangImpl09.rst
index 0304c8e..c641999 100644
--- a/llvm/docs/tutorial/MyFirstLanguageFrontend/LangImpl09.rst
+++ b/llvm/docs/tutorial/MyFirstLanguageFrontend/LangImpl09.rst
@@ -341,7 +341,7 @@ We use a small helper function for this:
else
Scope = LexicalBlocks.back();
Builder.SetCurrentDebugLocation(
- DebugLoc::get(AST->getLine(), AST->getCol(), Scope));
+ DILocation::get(Scope->getContext(), AST->getLine(), AST->getCol(), Scope));
}
This both tells the main ``IRBuilder`` where we are, but also what scope
@@ -400,7 +400,7 @@ argument allocas in ``FunctionAST::codegen``.
true);
DBuilder->insertDeclare(Alloca, D, DBuilder->createExpression(),
- DebugLoc::get(LineNo, 0, SP),
+ DILocation::get(SP->getContext(), LineNo, 0, SP),
Builder.GetInsertBlock());
// Store the initial value into the alloca.