aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDevang Patel <dpatel@apple.com>2008-07-16 17:54:34 +0000
committerDevang Patel <dpatel@apple.com>2008-07-16 17:54:34 +0000
commit0d885d1661f87bd2dc25bfdacb29413f0be81bd4 (patch)
tree85662284bbac210edf64d70f9928901fca02e8a7 /lib
parent5d0af038a718ff31b1ecf0894bae951e41960e0d (diff)
Mark function used by asm block as used, otherwise optimizer may not see the use and may delete the function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53692 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/Target/X86/X86JITInfo.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/Target/X86/X86JITInfo.cpp b/lib/Target/X86/X86JITInfo.cpp
index 0cda7d3a43..f7d1118d70 100644
--- a/lib/Target/X86/X86JITInfo.cpp
+++ b/lib/Target/X86/X86JITInfo.cpp
@@ -18,6 +18,7 @@
#include "llvm/Function.h"
#include "llvm/CodeGen/MachineCodeEmitter.h"
#include "llvm/Config/alloca.h"
+#include "llvm/Support/Compiler.h"
#include <cstdlib>
#include <cstring>
using namespace llvm;
@@ -315,7 +316,8 @@ extern "C" {
/// function stub when we did not know the real target of a call. This function
/// must locate the start of the stub or call site and pass it into the JIT
/// compiler function.
-extern "C" void X86CompilationCallback2(intptr_t *StackPtr, intptr_t RetAddr) {
+extern "C" void ATTRIBUTE_USED
+X86CompilationCallback2(intptr_t *StackPtr, intptr_t RetAddr) {
intptr_t *RetAddrLoc = &StackPtr[1];
assert(*RetAddrLoc == RetAddr &&
"Could not find return address on the stack!");