diff options
author | David Greene <greened@obbligato.org> | 2013-01-14 21:04:35 +0000 |
---|---|---|
committer | David Greene <greened@obbligato.org> | 2013-01-14 21:04:35 +0000 |
commit | c8be88ab562412da359f714502e30ff61459efa0 (patch) | |
tree | 8835330805fa27bd8b05d6b683d2df8962090f0b /unittests/IR | |
parent | 1ba5769676bb14078ddbdb9760523619726800c0 (diff) | |
download | external_llvm-c8be88ab562412da359f714502e30ff61459efa0.zip external_llvm-c8be88ab562412da359f714502e30ff61459efa0.tar.gz external_llvm-c8be88ab562412da359f714502e30ff61459efa0.tar.bz2 |
Fix Casts
Use const_cast<> to avoid cast-away-const errors.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172464 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'unittests/IR')
-rw-r--r-- | unittests/IR/WaymarkTest.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/unittests/IR/WaymarkTest.cpp b/unittests/IR/WaymarkTest.cpp index 69fc4da..1e98075 100644 --- a/unittests/IR/WaymarkTest.cpp +++ b/unittests/IR/WaymarkTest.cpp @@ -46,7 +46,8 @@ TEST(WaymarkTest, TwoBit) { Use::initTags(many, many + 8212); for (const Use *U = many, *Ue = many + 8212 - 1; U != Ue; ++U) { - EXPECT_EQ((User*)(Ue + 1), U->getUser()); + EXPECT_EQ(reinterpret_cast<User*>(const_cast<Use *>(Ue + 1)), + U->getUser()); } } |