OSDN Git Service

Fix non-{arm, x86} builds.
authorNicolas Geoffray <ngeoffray@google.com>
Thu, 13 Mar 2014 10:28:41 +0000 (10:28 +0000)
committerNicolas Geoffray <ngeoffray@google.com>
Thu, 13 Mar 2014 10:28:41 +0000 (10:28 +0000)
Change-Id: If4c13775f8e1fd0fd26b4a731f3011c77b0bfed1

compiler/optimizing/codegen_test.cc

index a6ecdfb..5020dd0 100644 (file)
@@ -57,14 +57,17 @@ static void TestCode(const uint16_t* data, bool has_result = false, int32_t expe
   typedef int32_t (*fptr)();
 #if defined(__i386__)
   int32_t result = reinterpret_cast<fptr>(allocator.memory())();
+  if (has_result) {
+    CHECK_EQ(result, expected);
+  }
 #endif
   CHECK(CodeGenerator::CompileGraph(graph, kArm, &allocator));
 #if defined(__arm__)
   int32_t result = reinterpret_cast<fptr>(allocator.memory())();
-#endif
   if (has_result) {
     CHECK_EQ(result, expected);
   }
+#endif
 }
 
 TEST(CodegenTest, ReturnVoid) {