From 27d183d42fc392d4827c2fb9d6dca02691eba84c Mon Sep 17 00:00:00 2001 From: Andrey Shishpanov Date: Fri, 13 May 2016 15:48:27 +0300 Subject: [PATCH] Fix for LLVM 3.9 trunk, lStripUnusedDebugInfo() made empty. --- module.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/module.cpp b/module.cpp index a7bac64f..3903efbc 100644 --- a/module.cpp +++ b/module.cpp @@ -167,6 +167,11 @@ lDeclareSizeAndPtrIntTypes(SymbolTable *symbolTable) { */ static void lStripUnusedDebugInfo(llvm::Module *module) { +#if ISPC_LLVM_VERSION >= ISPC_LLVM_3_9 + // In LLVM 3.9 Global DCE is much more efficient than the LLVM 3.8's one. + // So, the fruitfulness of this function is negligible. + return; +#else if (g->generateDebuggingSymbols == false) return; #if ISPC_LLVM_VERSION <= ISPC_LLVM_3_5 // <= 3.5 @@ -368,6 +373,7 @@ lStripUnusedDebugInfo(llvm::Module *module) { } for (int i = 0; i < (int)toErase.size(); ++i) module->eraseNamedMetadata(toErase[i]); +#endif }