[llvm-commits] [llvm] r165777 - /llvm/trunk/unittests/ExecutionEngine/JIT/JITTest.cpp

Bill Wendling isanbard at gmail.com
Thu Oct 11 18:15:17 PDT 2012


Author: void
Date: Thu Oct 11 20:15:17 2012
New Revision: 165777

URL: http://llvm.org/viewvc/llvm-project?rev=165777&view=rev
Log:
Mark function as 'used' so that LTO doesn't try to get rid of it.

Modified:
    llvm/trunk/unittests/ExecutionEngine/JIT/JITTest.cpp

Modified: llvm/trunk/unittests/ExecutionEngine/JIT/JITTest.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/ExecutionEngine/JIT/JITTest.cpp?rev=165777&r1=165776&r2=165777&view=diff
==============================================================================
--- llvm/trunk/unittests/ExecutionEngine/JIT/JITTest.cpp (original)
+++ llvm/trunk/unittests/ExecutionEngine/JIT/JITTest.cpp Thu Oct 11 20:15:17 2012
@@ -633,7 +633,7 @@
 // This function is intentionally defined differently in the statically-compiled
 // program from the IR input to the JIT to assert that the JIT doesn't use its
 // definition.
-extern "C" int32_t JITTest_AvailableExternallyFunction() {
+extern "C" int32_t JITTest_AvailableExternallyFunction() __attribute__((used)) {
   return 42;
 }
 namespace {





More information about the llvm-commits mailing list