Mercurial > projects > ldc
comparison ir/irtypeclass.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 | ed70675862c8 |
children | 755abafbf25d |
comparison
equal
deleted
inserted
replaced
1501:8b9f236dd051 | 1502:2292878925f4 |
---|---|
279 // name vtbl type | 279 // name vtbl type |
280 std::string name(cd->toPrettyChars()); | 280 std::string name(cd->toPrettyChars()); |
281 name.append(".__vtbl"); | 281 name.append(".__vtbl"); |
282 Type::sir->getState()->module->addTypeName(name, vtbl_pa.get()); | 282 Type::sir->getState()->module->addTypeName(name, vtbl_pa.get()); |
283 | 283 |
284 #if 0 | |
285 IF_LOG Logger::cout() << "class type: " << *pa.get() << std::endl; | 284 IF_LOG Logger::cout() << "class type: " << *pa.get() << std::endl; |
286 #endif | |
287 | 285 |
288 return get(); | 286 return get(); |
289 } | 287 } |
290 | 288 |
291 ////////////////////////////////////////////////////////////////////////////// | 289 ////////////////////////////////////////////////////////////////////////////// |