[llvm-commits] [llvm] r167724 - /llvm/trunk/unittests/VMCore/WaymarkTest.cpp

Gabor Greif ggreif at gmail.com
Mon Nov 12 05:34:59 PST 2012


Author: ggreif
Date: Mon Nov 12 07:34:59 2012
New Revision: 167724

URL: http://llvm.org/viewvc/llvm-project?rev=167724&view=rev
Log:
do not play preprocessor tricks with 'private', use public interfaces instead; this appeases the VC++ buildbots

Modified:
    llvm/trunk/unittests/VMCore/WaymarkTest.cpp

Modified: llvm/trunk/unittests/VMCore/WaymarkTest.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/VMCore/WaymarkTest.cpp?rev=167724&r1=167723&r2=167724&view=diff
==============================================================================
--- llvm/trunk/unittests/VMCore/WaymarkTest.cpp (original)
+++ llvm/trunk/unittests/VMCore/WaymarkTest.cpp Mon Nov 12 07:34:59 2012
@@ -9,9 +9,6 @@
 
 // we perform white-box tests
 //
-#define private public
-#include "llvm/Use.h"
-#undef private
 #include "llvm/Function.h"
 #include "llvm/Instructions.h"
 #include "llvm/LLVMContext.h"
@@ -24,7 +21,7 @@
 Constant *char2constant(char c) {
   return ConstantInt::get(Type::getInt8Ty(getGlobalContext()), c);
 }
-  
+
 
 TEST(WaymarkTest, NativeArray) {
   static uint8_t tail[22] = "s02s33s30y2y0s1x0syxS";
@@ -39,17 +36,17 @@
 	const Use *Ue = &A->getOperandUse(22);
   for (; U != Ue; ++U)
   {
-    EXPECT_EQ(Ue + 1, U->getImpliedUser());
+    EXPECT_EQ(A, U->getUser());
   }
 }
 
 TEST(WaymarkTest, TwoBit) {
-  Use* many = (Use*)calloc(sizeof(Use), 8212);
+  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)
   {
-    EXPECT_EQ(Ue + 1, U->getImpliedUser());
+    EXPECT_EQ((User*)(Ue + 1), U->getUser());
   }
 }
 





More information about the llvm-commits mailing list