From 3b3bc5d45a37f83be1e010e0e00a2f30ea67d860 Mon Sep 17 00:00:00 2001 From: Fangrui Song Date: Fri, 11 Dec 2020 18:01:04 -0800 Subject: [PATCH] [Kaleidoscope] Migrate DebugInfo::get to DILocation::get --- llvm/examples/Kaleidoscope/Chapter9/toy.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/llvm/examples/Kaleidoscope/Chapter9/toy.cpp b/llvm/examples/Kaleidoscope/Chapter9/toy.cpp index 29a4ee14fc01..e23d14448499 100644 --- a/llvm/examples/Kaleidoscope/Chapter9/toy.cpp +++ b/llvm/examples/Kaleidoscope/Chapter9/toy.cpp @@ -848,8 +848,8 @@ void DebugInfo::emitLocation(ExprAST *AST) { Scope = TheCU; else Scope = LexicalBlocks.back(); - Builder->SetCurrentDebugLocation( - DebugLoc::get(AST->getLine(), AST->getCol(), Scope)); + Builder->SetCurrentDebugLocation(DILocation::get( + Scope->getContext(), AST->getLine(), AST->getCol(), Scope)); } static DISubroutineType *CreateFunctionType(unsigned NumArgs, DIFile *Unit) { @@ -1277,7 +1277,7 @@ Function *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.