mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-19 03:24:09 +00:00
Unbreak the gdb buildbot by not lowering dbg.declare intrinsics for arrays.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207284 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -1019,6 +1019,12 @@ bool llvm::ConvertDebugDeclareToDebugValue(DbgDeclareInst *DDI,
|
||||
return true;
|
||||
}
|
||||
|
||||
/// Determine whether this alloca is either a VLA or an array.
|
||||
static bool isArray(AllocaInst *AI) {
|
||||
return AI->isArrayAllocation() ||
|
||||
AI->getType()->getElementType()->isArrayTy();
|
||||
}
|
||||
|
||||
/// LowerDbgDeclare - Lowers llvm.dbg.declare intrinsics into appropriate set
|
||||
/// of llvm.dbg.value intrinsics.
|
||||
bool llvm::LowerDbgDeclare(Function &F) {
|
||||
@ -1041,7 +1047,7 @@ bool llvm::LowerDbgDeclare(Function &F) {
|
||||
// stored on the stack, while the dbg.declare can only describe
|
||||
// the stack slot (and at a lexical-scope granularity). Later
|
||||
// passes will attempt to elide the stack slot.
|
||||
if (AI && !AI->isArrayAllocation()) {
|
||||
if (AI && !isArray(AI)) {
|
||||
for (User *U : AI->users())
|
||||
if (StoreInst *SI = dyn_cast<StoreInst>(U))
|
||||
ConvertDebugDeclareToDebugValue(DDI, SI, DIB);
|
||||
|
Reference in New Issue
Block a user