Migrate deprecated DebugLoc::get to DILocation::get
This migrates all LLVM (except Kaleidoscope and CodeGen/StackProtector.cpp) DebugLoc::get to DILocation::get. The CodeGen/StackProtector.cpp usage may have a nullptr Scope and can trigger an assertion failure, so I don't migrate it. Reviewed By: #debug-info, dblaikie Differential Revision: https://reviews.llvm.org/D93087
This commit is contained in:
@@ -3959,7 +3959,8 @@ Error BitcodeReader::parseFunctionBody(Function *F) {
|
||||
if (!IA)
|
||||
return error("Invalid record");
|
||||
}
|
||||
LastLoc = DebugLoc::get(Line, Col, Scope, IA, isImplicitCode);
|
||||
LastLoc = DILocation::get(Scope->getContext(), Line, Col, Scope, IA,
|
||||
isImplicitCode);
|
||||
I->setDebugLoc(LastLoc);
|
||||
I = nullptr;
|
||||
continue;
|
||||
|
||||
Reference in New Issue
Block a user