aboutsummaryrefslogtreecommitdiff
path: root/src/codegen.cpp
diff options
context:
space:
mode:
authorAndrew Kelley <superjoe30@gmail.com>2018-09-11 22:46:22 -0400
committerAndrew Kelley <superjoe30@gmail.com>2018-09-11 22:46:22 -0400
commit014cc60a72ac2d64935bf424459b5fa13e281ed9 (patch)
tree7f8c43d42297bb52e39366bb45084f7ee6662ae3 /src/codegen.cpp
parentee263a15cc8fb52c2ac6053a29168fb15089839b (diff)
downloadzig-014cc60a72ac2d64935bf424459b5fa13e281ed9.tar.gz
zig-014cc60a72ac2d64935bf424459b5fa13e281ed9.zip
rename --enable-timing-info to -ftime-report to match clang
and have it print llvm's internal timing info
Diffstat (limited to 'src/codegen.cpp')
-rw-r--r--src/codegen.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/codegen.cpp b/src/codegen.cpp
index aeb2b6edc4..6f21ceecab 100644
--- a/src/codegen.cpp
+++ b/src/codegen.cpp
@@ -6398,7 +6398,8 @@ static void zig_llvm_emit_output(CodeGen *g) {
switch (g->emit_file_type) {
case EmitFileTypeBinary:
if (ZigLLVMTargetMachineEmitToFile(g->target_machine, g->module, buf_ptr(output_path),
- ZigLLVM_EmitBinary, &err_msg, g->build_mode == BuildModeDebug, is_small))
+ ZigLLVM_EmitBinary, &err_msg, g->build_mode == BuildModeDebug, is_small,
+ g->enable_time_report))
{
zig_panic("unable to write object file %s: %s", buf_ptr(output_path), err_msg);
}
@@ -6408,7 +6409,8 @@ static void zig_llvm_emit_output(CodeGen *g) {
case EmitFileTypeAssembly:
if (ZigLLVMTargetMachineEmitToFile(g->target_machine, g->module, buf_ptr(output_path),
- ZigLLVM_EmitAssembly, &err_msg, g->build_mode == BuildModeDebug, is_small))
+ ZigLLVM_EmitAssembly, &err_msg, g->build_mode == BuildModeDebug, is_small,
+ g->enable_time_report))
{
zig_panic("unable to write assembly file %s: %s", buf_ptr(output_path), err_msg);
}
@@ -6417,7 +6419,8 @@ static void zig_llvm_emit_output(CodeGen *g) {
case EmitFileTypeLLVMIr:
if (ZigLLVMTargetMachineEmitToFile(g->target_machine, g->module, buf_ptr(output_path),
- ZigLLVM_EmitLLVMIr, &err_msg, g->build_mode == BuildModeDebug, is_small))
+ ZigLLVM_EmitLLVMIr, &err_msg, g->build_mode == BuildModeDebug, is_small,
+ g->enable_time_report))
{
zig_panic("unable to write llvm-ir file %s: %s", buf_ptr(output_path), err_msg);
}