From 2267f278d25b91b5b39e0e38c7c7eab30fdc6b60 Mon Sep 17 00:00:00 2001 From: Dmitry Babokin Date: Tue, 4 Jun 2013 14:38:56 +0400 Subject: [PATCH] Fix for #503 - avoid omitting frame pointer on Win32 --- ispc.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/ispc.cpp b/ispc.cpp index dccbe423..89c6898e 100644 --- a/ispc.cpp +++ b/ispc.cpp @@ -441,6 +441,14 @@ Target::Target(const char *arch, const char *cpu, const char *isa, bool pic) : if (g->opt.disableFMA == false) options.AllowFPOpFusion = llvm::FPOpFusion::Fast; #endif // !LLVM_3_1 + +#ifdef ISPC_IS_WINDOWS + if (strcmp("x86", arch) == 0) { + // Workaround for issue #503 (LLVM issue 14646). + // It's Win32 specific. + options.NoFramePointerElim = true; + } +#endif m_targetMachine = m_target->createTargetMachine(triple, m_cpu, featuresString, options, relocModel);