comparison gen/toobj.cpp @ 1502:2292878925f4

Add an `llvm::OStream` workalike class for use with `Logger::cout()`, with the crucial difference being special handling of `llvm::Type`s so they get printed by name rather than printing their full representation (which can be positively *huge*). This allows re-enabling some logger calls that were disabled due to extreme verbosity.
author Frits van Bommel <fvbommel wxs.nl>
date Tue, 16 Jun 2009 19:31:10 +0200
parents 4dca8ed9d8b7
children 982eb70e83b2
comparison
equal deleted inserted replaced
1501:8b9f236dd051 1502:2292878925f4
383 Args.push_back(0); 383 Args.push_back(0);
384 384
385 if (Logger::enabled()) { 385 if (Logger::enabled()) {
386 Logger::println("Assembling with: "); 386 Logger::println("Assembling with: ");
387 std::vector<const char*>::const_iterator I = Args.begin(), E = Args.end(); 387 std::vector<const char*>::const_iterator I = Args.begin(), E = Args.end();
388 std::ostream& logstr = *Logger::cout().stream(); 388 Stream logstr = Logger::cout();
389 for (; I != E; ++I) 389 for (; I != E; ++I)
390 if (*I) 390 if (*I)
391 logstr << "'" << *I << "'" << " "; 391 logstr << "'" << *I << "'" << " ";
392 logstr << "\n" << std::flush; 392 logstr << "\n" << std::flush;
393 } 393 }