From 4c66a58b644bee6a8e2f1ac13c38901bfeddd84e Mon Sep 17 00:00:00 2001 From: David Greene Date: Mon, 14 Jan 2013 21:04:35 +0000 Subject: [PATCH] Fix Casts Use const_cast<> to avoid cast-away-const errors. llvm-svn: 172464 --- llvm/unittests/IR/WaymarkTest.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/llvm/unittests/IR/WaymarkTest.cpp b/llvm/unittests/IR/WaymarkTest.cpp index 69fc4da..1e98075 100644 --- a/llvm/unittests/IR/WaymarkTest.cpp +++ b/llvm/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(const_cast(Ue + 1)), + U->getUser()); } } -- 2.7.4