aboutsummaryrefslogtreecommitdiffstats
path: root/unittests/IR
diff options
context:
space:
mode:
authorDmitri Gribenko <gribozavr@gmail.com>2013-01-14 21:23:37 +0000
committerDmitri Gribenko <gribozavr@gmail.com>2013-01-14 21:23:37 +0000
commit31659fa066b00afeea38d36ba87b531a4d7313d7 (patch)
tree2794bdfdd56767d86c5c7661787409f280b6afcc /unittests/IR
parent398db9368d72d1d60d40b2e18c16ca2c14aa7f39 (diff)
downloadexternal_llvm-31659fa066b00afeea38d36ba87b531a4d7313d7.zip
external_llvm-31659fa066b00afeea38d36ba87b531a4d7313d7.tar.gz
external_llvm-31659fa066b00afeea38d36ba87b531a4d7313d7.tar.bz2
Improve r172464: const_cast is not needed if the variable is not const
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172474 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'unittests/IR')
-rw-r--r--unittests/IR/WaymarkTest.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/unittests/IR/WaymarkTest.cpp b/unittests/IR/WaymarkTest.cpp
index 1e98075..0fe0a43 100644
--- a/unittests/IR/WaymarkTest.cpp
+++ b/unittests/IR/WaymarkTest.cpp
@@ -44,10 +44,9 @@ TEST(WaymarkTest, TwoBit) {
Use* many = (Use*)calloc(sizeof(Use), 8212 + 1);
ASSERT_TRUE(many);
Use::initTags(many, many + 8212);
- for (const Use *U = many, *Ue = many + 8212 - 1; U != Ue; ++U)
+ for (Use *U = many, *Ue = many + 8212 - 1; U != Ue; ++U)
{
- EXPECT_EQ(reinterpret_cast<User*>(const_cast<Use *>(Ue + 1)),
- U->getUser());
+ EXPECT_EQ(reinterpret_cast<User *>(Ue + 1), U->getUser());
}
}