diff gen/asmstmt.cpp @ 622:26fce59fe80a

Wrapped all the most potentially expensive logging calls in a conditional to only do work when actually requested. Commented some logging calls that could potentially write out many megabytes of type dumps.
author Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
date Wed, 01 Oct 2008 18:32:31 +0200
parents c7d7e2282ba3
children a58784e0f035
line wrap: on
line diff
--- a/gen/asmstmt.cpp	Sun Sep 28 21:09:21 2008 +0200
+++ b/gen/asmstmt.cpp	Wed Oct 01 18:32:31 2008 +0200
@@ -624,7 +624,8 @@
     types.insert(types.end(), outtypes.begin(), outtypes.end());
     types.insert(types.end(), intypes.begin(), intypes.end());
     llvm::FunctionType* fty = llvm::FunctionType::get(llvm::Type::VoidTy, types, false);
-    Logger::cout() << "function type = " << *fty << '\n';
+    if (Logger::enabled())
+        Logger::cout() << "function type = " << *fty << '\n';
     llvm::InlineAsm* ia = llvm::InlineAsm::get(fty, code, out_c, true);
 
     std::vector<LLValue*> args;