add module flag to emit CodeView for COFF object files

see #516
This commit is contained in:
Andrew Kelley
2017-10-10 18:04:02 -04:00
parent 1c28631738
commit aa78827db2
4 changed files with 14 additions and 1 deletions

View File

@@ -4992,7 +4992,11 @@ static void init(CodeGen *g) {
LLVMSetTarget(g->module, buf_ptr(&g->triple_str));
ZigLLVMAddModuleDebugInfoFlag(g->module);
if (g->zig_target.oformat == ZigLLVM_COFF) {
ZigLLVMAddModuleCodeViewFlag(g->module);
} else {
ZigLLVMAddModuleDebugInfoFlag(g->module);
}
LLVMTargetRef target_ref;
char *err_msg = nullptr;