mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-30 20:24:32 +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:
@ -854,7 +854,9 @@ static bool LdStHasDebugValue(DIVariable &DIVar, Instruction *I) {
|
||||
bool llvm::ConvertDebugDeclareToDebugValue(DbgDeclareInst *DDI,
|
||||
StoreInst *SI, DIBuilder &Builder) {
|
||||
DIVariable DIVar(DDI->getVariable());
|
||||
if (!DIVar.Verify())
|
||||
assert((!DIVar || DIVar.isVariable()) &&
|
||||
"Variable in DbgDeclareInst should be either null or a DIVariable.");
|
||||
if (!DIVar)
|
||||
return false;
|
||||
|
||||
if (LdStHasDebugValue(DIVar, SI))
|
||||
@ -888,7 +890,9 @@ bool llvm::ConvertDebugDeclareToDebugValue(DbgDeclareInst *DDI,
|
||||
bool llvm::ConvertDebugDeclareToDebugValue(DbgDeclareInst *DDI,
|
||||
LoadInst *LI, DIBuilder &Builder) {
|
||||
DIVariable DIVar(DDI->getVariable());
|
||||
if (!DIVar.Verify())
|
||||
assert((!DIVar || DIVar.isVariable()) &&
|
||||
"Variable in DbgDeclareInst should be either null or a DIVariable.");
|
||||
if (!DIVar)
|
||||
return false;
|
||||
|
||||
if (LdStHasDebugValue(DIVar, LI))
|
||||
@ -961,7 +965,9 @@ bool llvm::replaceDbgDeclareForAlloca(AllocaInst *AI, Value *NewAllocaAddress,
|
||||
if (!DDI)
|
||||
return false;
|
||||
DIVariable DIVar(DDI->getVariable());
|
||||
if (!DIVar.Verify())
|
||||
assert((!DIVar || DIVar.isVariable()) &&
|
||||
"Variable in DbgDeclareInst should be either null or a DIVariable.");
|
||||
if (!DIVar)
|
||||
return false;
|
||||
|
||||
// Create a copy of the original DIDescriptor for user variable, appending
|
||||
|
Reference in New Issue
Block a user