mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-07-22 09:29:31 +00:00
Print new instructions without DebugLoc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130542 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
51864a1d2b
commit
0b2fb39d8d
@ -53,6 +53,7 @@ namespace llvm {
|
|||||||
Function *TheFn;
|
Function *TheFn;
|
||||||
std::set<unsigned> LineNos;
|
std::set<unsigned> LineNos;
|
||||||
std::set<MDNode *> DbgVariables;
|
std::set<MDNode *> DbgVariables;
|
||||||
|
std::set<Instruction *> MissingDebugLoc;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -89,6 +90,8 @@ void DebugInfoProbeImpl::initialize(StringRef PName, Function &F) {
|
|||||||
for (Function::iterator FI = F.begin(), FE = F.end(); FI != FE; ++FI)
|
for (Function::iterator FI = F.begin(), FE = F.end(); FI != FE; ++FI)
|
||||||
for (BasicBlock::iterator BI = FI->begin(), BE = FI->end();
|
for (BasicBlock::iterator BI = FI->begin(), BE = FI->end();
|
||||||
BI != BE; ++BI) {
|
BI != BE; ++BI) {
|
||||||
|
if (BI->getDebugLoc().isUnknown())
|
||||||
|
MissingDebugLoc.insert(BI);
|
||||||
if (!isa<DbgInfoIntrinsic>(BI)) continue;
|
if (!isa<DbgInfoIntrinsic>(BI)) continue;
|
||||||
Value *Addr = NULL;
|
Value *Addr = NULL;
|
||||||
MDNode *Node = NULL;
|
MDNode *Node = NULL;
|
||||||
@ -148,6 +151,12 @@ void DebugInfoProbeImpl::finalize(Function &F) {
|
|||||||
for (Function::iterator FI = F.begin(), FE = F.end(); FI != FE; ++FI)
|
for (Function::iterator FI = F.begin(), FE = F.end(); FI != FE; ++FI)
|
||||||
for (BasicBlock::iterator BI = FI->begin(), BE = FI->end();
|
for (BasicBlock::iterator BI = FI->begin(), BE = FI->end();
|
||||||
BI != BE; ++BI) {
|
BI != BE; ++BI) {
|
||||||
|
if (BI->getDebugLoc().isUnknown() &&
|
||||||
|
MissingDebugLoc.count(BI) == 0) {
|
||||||
|
DEBUG(dbgs() << "DebugInfoProbe(" << PassName << "): --- ");
|
||||||
|
DEBUG(BI->print(dbgs()));
|
||||||
|
DEBUG(dbgs() << "\n");
|
||||||
|
}
|
||||||
if (!isa<DbgInfoIntrinsic>(BI)) continue;
|
if (!isa<DbgInfoIntrinsic>(BI)) continue;
|
||||||
Value *Addr = NULL;
|
Value *Addr = NULL;
|
||||||
MDNode *Node = NULL;
|
MDNode *Node = NULL;
|
||||||
|
Loading…
Reference in New Issue
Block a user