1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-18 10:32:48 +02:00

[Kaleidoscope] Migrate DebugInfo::get to DILocation::get

This commit is contained in:
Fangrui Song 2020-12-11 18:01:04 -08:00
parent 160287755d
commit 3e1d1f4661

View File

@ -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.