Do not add DWARF version before LLVM 3.5

This commit is contained in:
Dmitry Babokin
2016-07-04 16:37:46 +03:00
parent 528f6cef1c
commit c6ae79cbc8
3 changed files with 13 additions and 1 deletions

View File

@@ -1102,10 +1102,13 @@ Target::Target(const char *arch, const char *cpu, const char *isa, bool pic, boo
#else /* LLVM 3.7+ */
m_targetMachine->Options.MCOptions.AsmVerbose = true;
#endif
#if ISPC_LLVM_VERSION >= ISPC_LLVM_3_5
// Change default version of generated DWARF.
if (g->generateDWARFVersion != 0) {
m_targetMachine->Options.MCOptions.DwarfVersion = g->generateDWARFVersion;
}
#endif
// Initialize TargetData/DataLayout in 3 steps.
// 1. Get default data layout first
@@ -1522,7 +1525,9 @@ Globals::Globals() {
emitPerfWarnings = true;
emitInstrumentation = false;
generateDebuggingSymbols = false;
#if ISPC_LLVM_VERSION >= ISPC_LLVM_3_5
generateDWARFVersion = 0;
#endif
enableFuzzTest = false;
fuzzTestSeed = -1;
mangleFunctionsWithTarget = false;