comparison gen/asmstmt.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 15e9762bb620
children 7fcb72d518f6
comparison
equal deleted inserted replaced
1501:8b9f236dd051 1502:2292878925f4
719 719
720 if (Logger::enabled()) { 720 if (Logger::enabled()) {
721 Logger::cout() << "Arguments:" << '\n'; 721 Logger::cout() << "Arguments:" << '\n';
722 Logger::indent(); 722 Logger::indent();
723 for (std::vector<LLValue*>::iterator b = args.begin(), i = b, e = args.end(); i != e; ++i) { 723 for (std::vector<LLValue*>::iterator b = args.begin(), i = b, e = args.end(); i != e; ++i) {
724 llvm::OStream cout = Logger::cout(); 724 Stream cout = Logger::cout();
725 cout << '$' << (i - b) << " ==> " << **i; 725 cout << '$' << (i - b) << " ==> " << **i;
726 if (!llvm::isa<llvm::Instruction>(*i) && !llvm::isa<LLGlobalValue>(*i)) 726 if (!llvm::isa<llvm::Instruction>(*i) && !llvm::isa<LLGlobalValue>(*i))
727 cout << '\n'; 727 cout << '\n';
728 } 728 }
729 Logger::undent(); 729 Logger::undent();