]> granicus.if.org Git - clang/commitdiff
don't print codegen time unless -ftime-report was passed.
authorChris Lattner <sabre@nondot.org>
Wed, 18 Feb 2009 18:22:50 +0000 (18:22 +0000)
committerChris Lattner <sabre@nondot.org>
Wed, 18 Feb 2009 18:22:50 +0000 (18:22 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64928 91177308-0d34-0410-b5e6-96231b3b80d8

Driver/Backend.cpp

index a751041b98941cecbfab6f6f7564a7b576e63c53..8cffae0748400f046a4d5b5bbedb060c7438db51 100644 (file)
@@ -355,7 +355,9 @@ void BackendConsumer::EmitAssembly() {
   if (!TheModule || !TheTargetData)
     return;
   
-  TimeRegion Region(CodeGenerationTime);
+  
+  
+  TimeRegion Region(CompileOpts.TimePasses ? &CodeGenerationTime : 0);
 
   // Make sure IR generation is happy with the module. This is
   // released by the module provider.