mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-15 05:24:01 +00:00
Debug Info: clean up usage of Verify.
No functionality change. It should suffice to check the type of a debug info metadata, instead of calling Verify. For cases where we know the type of a DI metadata, use assert. Also update testing cases to make them conform to the format of DI classes. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185135 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -1411,8 +1411,10 @@ static void printDebugLoc(DebugLoc DL, const MachineFunction *MF,
|
||||
const LLVMContext &Ctx = MF->getFunction()->getContext();
|
||||
if (!DL.isUnknown()) { // Print source line info.
|
||||
DIScope Scope(DL.getScope(Ctx));
|
||||
assert((!Scope || Scope.isScope()) &&
|
||||
"Scope of a DebugLoc should be null or a DIScope.");
|
||||
// Omit the directory, because it's likely to be long and uninteresting.
|
||||
if (Scope.Verify())
|
||||
if (Scope)
|
||||
CommentOS << Scope.getFilename();
|
||||
else
|
||||
CommentOS << "<unknown>";
|
||||
|
Reference in New Issue
Block a user