mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-05 13:26:55 +00:00
remove autoupgrade support for really old-style debug info intrinsics.
I think this is the last of autoupgrade that can be removed in 3.1. Can the atomic upgrade stuff also go? git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145169 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -299,45 +299,3 @@ void llvm::UpgradeCallsToIntrinsic(Function* F) {
|
||||
}
|
||||
}
|
||||
|
||||
/// This function strips all debug info intrinsics, except for llvm.dbg.declare.
|
||||
/// If an llvm.dbg.declare intrinsic is invalid, then this function simply
|
||||
/// strips that use.
|
||||
void llvm::CheckDebugInfoIntrinsics(Module *M) {
|
||||
if (Function *FuncStart = M->getFunction("llvm.dbg.func.start")) {
|
||||
while (!FuncStart->use_empty())
|
||||
cast<CallInst>(FuncStart->use_back())->eraseFromParent();
|
||||
FuncStart->eraseFromParent();
|
||||
}
|
||||
|
||||
if (Function *StopPoint = M->getFunction("llvm.dbg.stoppoint")) {
|
||||
while (!StopPoint->use_empty())
|
||||
cast<CallInst>(StopPoint->use_back())->eraseFromParent();
|
||||
StopPoint->eraseFromParent();
|
||||
}
|
||||
|
||||
if (Function *RegionStart = M->getFunction("llvm.dbg.region.start")) {
|
||||
while (!RegionStart->use_empty())
|
||||
cast<CallInst>(RegionStart->use_back())->eraseFromParent();
|
||||
RegionStart->eraseFromParent();
|
||||
}
|
||||
|
||||
if (Function *RegionEnd = M->getFunction("llvm.dbg.region.end")) {
|
||||
while (!RegionEnd->use_empty())
|
||||
cast<CallInst>(RegionEnd->use_back())->eraseFromParent();
|
||||
RegionEnd->eraseFromParent();
|
||||
}
|
||||
|
||||
if (Function *Declare = M->getFunction("llvm.dbg.declare")) {
|
||||
if (!Declare->use_empty()) {
|
||||
DbgDeclareInst *DDI = cast<DbgDeclareInst>(Declare->use_back());
|
||||
if (!isa<MDNode>(DDI->getArgOperand(0)) ||
|
||||
!isa<MDNode>(DDI->getArgOperand(1))) {
|
||||
while (!Declare->use_empty()) {
|
||||
CallInst *CI = cast<CallInst>(Declare->use_back());
|
||||
CI->eraseFromParent();
|
||||
}
|
||||
Declare->eraseFromParent();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user