Marked this variable as 'used' so that LTO doesn't get rid of it.
authorBill Wendling <isanbard@gmail.com>
Wed, 17 Oct 2012 08:08:06 +0000 (08:08 +0000)
committerBill Wendling <isanbard@gmail.com>
Wed, 17 Oct 2012 08:08:06 +0000 (08:08 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166092 91177308-0d34-0410-b5e6-96231b3b80d8

unittests/ExecutionEngine/JIT/JITTest.cpp

index ae6855e68bfd53fc11dbb34a1e7a909c08f45aa7..6933091949b1553fab67b1f28f1cc3b9714bfd43 100644 (file)
@@ -606,7 +606,7 @@ TEST_F(JITTest, FunctionIsRecompiledAndRelinked) {
 // program from the IR input to the JIT to assert that the JIT doesn't use its
 // definition.
 extern "C" int32_t JITTest_AvailableExternallyGlobal;
-int32_t JITTest_AvailableExternallyGlobal = 42;
+int32_t JITTest_AvailableExternallyGlobal LLVM_ATTRIBUTE_USED = 42;
 namespace {
 
 // Tests on ARM disabled as we're running the old jit