Author: Fangrui Song Date: 2020-12-11T18:01:04-08:00 New Revision: 3b3bc5d45a37f83be1e010e0e00a2f30ea67d860
URL: https://github.com/llvm/llvm-project/commit/3b3bc5d45a37f83be1e010e0e00a2f30ea67d860 DIFF: https://github.com/llvm/llvm-project/commit/3b3bc5d45a37f83be1e010e0e00a2f30ea67d860.diff LOG: [Kaleidoscope] Migrate DebugInfo::get to DILocation::get Added: Modified: llvm/examples/Kaleidoscope/Chapter9/toy.cpp Removed: ################################################################################ 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. _______________________________________________ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits