Fix for LLVM 3.9 trunk, lStripUnusedDebugInfo() made empty.

This commit is contained in:
Andrey Shishpanov
2016-05-13 15:48:27 +03:00
parent 60d27ce4be
commit 27d183d42f

View File

@@ -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
}