mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-17 06:33:21 +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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185020 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
8b9962d514
commit
02e75021d8
@ -279,7 +279,7 @@ void NVPTXAsmPrinter::emitLineNumberAsDotLoc(const MachineInstr &MI) {
|
|||||||
const LLVMContext &ctx = MF->getFunction()->getContext();
|
const LLVMContext &ctx = MF->getFunction()->getContext();
|
||||||
DIScope Scope(curLoc.getScope(ctx));
|
DIScope Scope(curLoc.getScope(ctx));
|
||||||
|
|
||||||
if (!Scope.Verify())
|
if (!Scope.isScope())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
StringRef fileName(Scope.getFilename());
|
StringRef fileName(Scope.getFilename());
|
||||||
|
@ -434,7 +434,7 @@ void GCOVProfiler::emitProfileNotes() {
|
|||||||
DIArray SPs = CU.getSubprograms();
|
DIArray SPs = CU.getSubprograms();
|
||||||
for (unsigned i = 0, e = SPs.getNumElements(); i != e; ++i) {
|
for (unsigned i = 0, e = SPs.getNumElements(); i != e; ++i) {
|
||||||
DISubprogram SP(SPs.getElement(i));
|
DISubprogram SP(SPs.getElement(i));
|
||||||
if (!SP.Verify()) continue;
|
assert(SP.isSubprogram());
|
||||||
|
|
||||||
Function *F = SP.getFunction();
|
Function *F = SP.getFunction();
|
||||||
if (!F) continue;
|
if (!F) continue;
|
||||||
@ -483,7 +483,7 @@ bool GCOVProfiler::emitProfileArcs() {
|
|||||||
SmallVector<std::pair<GlobalVariable *, MDNode *>, 8> CountersBySP;
|
SmallVector<std::pair<GlobalVariable *, MDNode *>, 8> CountersBySP;
|
||||||
for (unsigned i = 0, e = SPs.getNumElements(); i != e; ++i) {
|
for (unsigned i = 0, e = SPs.getNumElements(); i != e; ++i) {
|
||||||
DISubprogram SP(SPs.getElement(i));
|
DISubprogram SP(SPs.getElement(i));
|
||||||
if (!SP.Verify()) continue;
|
assert(SP.isSubprogram());
|
||||||
Function *F = SP.getFunction();
|
Function *F = SP.getFunction();
|
||||||
if (!F) continue;
|
if (!F) continue;
|
||||||
if (!Result) Result = true;
|
if (!Result) Result = true;
|
||||||
|
@ -854,7 +854,7 @@ static bool LdStHasDebugValue(DIVariable &DIVar, Instruction *I) {
|
|||||||
bool llvm::ConvertDebugDeclareToDebugValue(DbgDeclareInst *DDI,
|
bool llvm::ConvertDebugDeclareToDebugValue(DbgDeclareInst *DDI,
|
||||||
StoreInst *SI, DIBuilder &Builder) {
|
StoreInst *SI, DIBuilder &Builder) {
|
||||||
DIVariable DIVar(DDI->getVariable());
|
DIVariable DIVar(DDI->getVariable());
|
||||||
if (!DIVar.Verify())
|
if (!DIVar.isVariable())
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (LdStHasDebugValue(DIVar, SI))
|
if (LdStHasDebugValue(DIVar, SI))
|
||||||
@ -888,7 +888,7 @@ bool llvm::ConvertDebugDeclareToDebugValue(DbgDeclareInst *DDI,
|
|||||||
bool llvm::ConvertDebugDeclareToDebugValue(DbgDeclareInst *DDI,
|
bool llvm::ConvertDebugDeclareToDebugValue(DbgDeclareInst *DDI,
|
||||||
LoadInst *LI, DIBuilder &Builder) {
|
LoadInst *LI, DIBuilder &Builder) {
|
||||||
DIVariable DIVar(DDI->getVariable());
|
DIVariable DIVar(DDI->getVariable());
|
||||||
if (!DIVar.Verify())
|
if (!DIVar.isVariable())
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (LdStHasDebugValue(DIVar, LI))
|
if (LdStHasDebugValue(DIVar, LI))
|
||||||
@ -961,7 +961,7 @@ bool llvm::replaceDbgDeclareForAlloca(AllocaInst *AI, Value *NewAllocaAddress,
|
|||||||
if (!DDI)
|
if (!DDI)
|
||||||
return false;
|
return false;
|
||||||
DIVariable DIVar(DDI->getVariable());
|
DIVariable DIVar(DDI->getVariable());
|
||||||
if (!DIVar.Verify())
|
if (!DIVar.isVariable())
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
// Create a copy of the original DIDescriptor for user variable, appending
|
// Create a copy of the original DIDescriptor for user variable, appending
|
||||||
|
@ -389,7 +389,7 @@ struct BreakpointPrinter : public ModulePass {
|
|||||||
for (unsigned i = 0, e = NMD->getNumOperands(); i != e; ++i) {
|
for (unsigned i = 0, e = NMD->getNumOperands(); i != e; ++i) {
|
||||||
std::string Name;
|
std::string Name;
|
||||||
DISubprogram SP(NMD->getOperand(i));
|
DISubprogram SP(NMD->getOperand(i));
|
||||||
if (SP.Verify())
|
assert(SP.isSubprogram());
|
||||||
getContextName(SP.getContext(), Name);
|
getContextName(SP.getContext(), Name);
|
||||||
Name = Name + SP.getDisplayName().str();
|
Name = Name + SP.getDisplayName().str();
|
||||||
if (!Name.empty() && Processed.insert(Name)) {
|
if (!Name.empty() && Processed.insert(Name)) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user