From 8c4e55762d8b7a07546a5db18e33ccc6a9d97002 Mon Sep 17 00:00:00 2001 From: Fangrui Song Date: Tue, 15 Dec 2020 14:17:04 -0800 Subject: [docs][unittest][Go][StackProtector] Migrate deprecated DebugInfo::get to DILocation::get --- llvm/docs/tutorial/MyFirstLanguageFrontend/LangImpl09.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'llvm/docs/tutorial/MyFirstLanguageFrontend') 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. -- cgit v1.1