mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-09 11:25:55 +00:00
BCUI + 1 doesn't work. Use next instead.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58830 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -30,6 +30,7 @@
|
|||||||
#include "llvm/ADT/SmallVector.h"
|
#include "llvm/ADT/SmallVector.h"
|
||||||
#include "llvm/ADT/Statistic.h"
|
#include "llvm/ADT/Statistic.h"
|
||||||
#include "llvm/ADT/StringExtras.h"
|
#include "llvm/ADT/StringExtras.h"
|
||||||
|
#include "llvm/ADT/STLExtras.h"
|
||||||
#include "llvm/Support/CFG.h"
|
#include "llvm/Support/CFG.h"
|
||||||
#include "llvm/Support/Compiler.h"
|
#include "llvm/Support/Compiler.h"
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
@@ -298,7 +299,7 @@ namespace {
|
|||||||
// Remove dbg intrinsic uses now.
|
// Remove dbg intrinsic uses now.
|
||||||
Value::use_iterator BCUI = BC->use_begin();
|
Value::use_iterator BCUI = BC->use_begin();
|
||||||
DbgInfoIntrinsic *DI = cast<DbgInfoIntrinsic>(*BCUI);
|
DbgInfoIntrinsic *DI = cast<DbgInfoIntrinsic>(*BCUI);
|
||||||
assert (BCUI + 1 == BC->use_end() && "Unexpected alloca uses!");
|
assert (next(BCUI) == BC->use_end() && "Unexpected alloca uses!");
|
||||||
DI->eraseFromParent();
|
DI->eraseFromParent();
|
||||||
BC->eraseFromParent();
|
BC->eraseFromParent();
|
||||||
} else if (StoreInst *SI = dyn_cast<StoreInst>(User)) {
|
} else if (StoreInst *SI = dyn_cast<StoreInst>(User)) {
|
||||||
|
Reference in New Issue
Block a user