mirror of
https://github.com/RPCSX/llvm.git
synced 2025-02-06 20:37:05 +00:00
Tidy up.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112858 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
b7a11b5399
commit
8e741ed2fa
@ -4064,19 +4064,10 @@ SelectionDAGBuilder::visitIntrinsicCall(const CallInst &I, unsigned Intrinsic) {
|
||||
}
|
||||
case Intrinsic::dbg_declare: {
|
||||
const DbgDeclareInst &DI = cast<DbgDeclareInst>(I);
|
||||
if (!DIVariable(DI.getVariable()).Verify())
|
||||
return 0;
|
||||
|
||||
MDNode *Variable = DI.getVariable();
|
||||
// Parameters are handled specially.
|
||||
bool isParameter =
|
||||
DIVariable(Variable).getTag() == dwarf::DW_TAG_arg_variable;
|
||||
const Value *Address = DI.getAddress();
|
||||
if (!Address)
|
||||
if (!Address || !DIVariable(DI.getVariable()).Verify())
|
||||
return 0;
|
||||
if (const BitCastInst *BCI = dyn_cast<BitCastInst>(Address))
|
||||
Address = BCI->getOperand(0);
|
||||
const AllocaInst *AI = dyn_cast<AllocaInst>(Address);
|
||||
|
||||
// Build an entry in DbgOrdering. Debug info input nodes get an SDNodeOrder
|
||||
// but do not always have a corresponding SDNode built. The SDNodeOrder
|
||||
@ -4089,6 +4080,13 @@ SelectionDAGBuilder::visitIntrinsicCall(const CallInst &I, unsigned Intrinsic) {
|
||||
N = UnusedArgNodeMap[Address];
|
||||
SDDbgValue *SDV;
|
||||
if (N.getNode()) {
|
||||
// Parameters are handled specially.
|
||||
bool isParameter =
|
||||
DIVariable(Variable).getTag() == dwarf::DW_TAG_arg_variable;
|
||||
if (const BitCastInst *BCI = dyn_cast<BitCastInst>(Address))
|
||||
Address = BCI->getOperand(0);
|
||||
const AllocaInst *AI = dyn_cast<AllocaInst>(Address);
|
||||
|
||||
if (isParameter && !AI) {
|
||||
FrameIndexSDNode *FINode = dyn_cast<FrameIndexSDNode>(N.getNode());
|
||||
if (FINode)
|
||||
@ -4113,7 +4111,7 @@ SelectionDAGBuilder::visitIntrinsicCall(const CallInst &I, unsigned Intrinsic) {
|
||||
if (!EmitFuncArgumentDbgValue(Address, Variable, 0, N)) {
|
||||
SDV = DAG.getDbgValue(Variable, UndefValue::get(Address->getType()),
|
||||
0, dl, SDNodeOrder);
|
||||
DAG.AddDbgValue(SDV, 0, isParameter);
|
||||
DAG.AddDbgValue(SDV, 0, false);
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user