aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Transforms/Utils
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2008-11-07 01:59:41 +0000
committerBill Wendling <isanbard@gmail.com>2008-11-07 01:59:41 +0000
commit507c49bb6853ad8576880d1623b906ca9c4a7a69 (patch)
treefa44ef4434db7a53bedfec13579b344c3d97b4a7 /lib/Transforms/Utils
parent5d07201bf71baf4dd777cd025cdf158f63614352 (diff)
downloadexternal_llvm-507c49bb6853ad8576880d1623b906ca9c4a7a69.zip
external_llvm-507c49bb6853ad8576880d1623b906ca9c4a7a69.tar.gz
external_llvm-507c49bb6853ad8576880d1623b906ca9c4a7a69.tar.bz2
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
Diffstat (limited to 'lib/Transforms/Utils')
-rw-r--r--lib/Transforms/Utils/PromoteMemoryToRegister.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Transforms/Utils/PromoteMemoryToRegister.cpp b/lib/Transforms/Utils/PromoteMemoryToRegister.cpp
index 0866a13..a567bdb 100644
--- a/lib/Transforms/Utils/PromoteMemoryToRegister.cpp
+++ b/lib/Transforms/Utils/PromoteMemoryToRegister.cpp
@@ -30,6 +30,7 @@
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/Statistic.h"
#include "llvm/ADT/StringExtras.h"
+#include "llvm/ADT/STLExtras.h"
#include "llvm/Support/CFG.h"
#include "llvm/Support/Compiler.h"
#include <algorithm>
@@ -298,7 +299,7 @@ namespace {
// Remove dbg intrinsic uses now.
Value::use_iterator BCUI = BC->use_begin();
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();
BC->eraseFromParent();
} else if (StoreInst *SI = dyn_cast<StoreInst>(User)) {