Mercurial > projects > ldc
comparison gen/dwarftypes.cpp @ 994:18ad5601dff7
Use LLVM OStream wrapper instead of <iostream> in the logger.
llvm::OStream provides all std::ostream functionality (by holding a
std::ostream* internally), but
* doesn't include <iostream>, avoiding per-file overhead.
* allows the stream pointer to be null, and the (inlined) operators do nothing
when that's the case. (This also allows removal of the ofstream("/dev/null")
hack Logger used when disabled, which presumably wasn't very portable)
author | Frits van Bommel <fvbommel wxs.nl> |
---|---|
date | Thu, 26 Feb 2009 14:51:02 +0100 |
parents | df196c8dea26 |
children | 755abafbf25d |
comparison
equal
deleted
inserted
replaced
993:27956b440c0a | 994:18ad5601dff7 |
---|---|
14 #include <llvm/Pass.h> | 14 #include <llvm/Pass.h> |
15 #include <llvm/PassManager.h> | 15 #include <llvm/PassManager.h> |
16 #include <llvm/Analysis/Verifier.h> | 16 #include <llvm/Analysis/Verifier.h> |
17 #include <llvm/Assembly/PrintModulePass.h> | 17 #include <llvm/Assembly/PrintModulePass.h> |
18 #include <algorithm> | 18 #include <algorithm> |
19 #include <iostream> | |
20 | 19 |
21 void RegisterDwarfSymbols(llvm::Module* mod) { | 20 void RegisterDwarfSymbols(llvm::Module* mod) { |
22 using namespace llvm; | 21 using namespace llvm; |
23 // Type Definitions | 22 // Type Definitions |
24 std::vector<const Type*>StructTy_llvm_dbg_anchor_type_fields; | 23 std::vector<const Type*>StructTy_llvm_dbg_anchor_type_fields; |