search for: nullstream

Displaying 7 results from an estimated 7 matches for "nullstream".

2007 Sep 25
0
[LLVMdev] Compilation Failure
...Stream& for the second argument. > However, when NDEBUG is #defined, DOUT is "llvm::OStream(0)", so it > can't be passed by reference. We ran into a similar problem in our custom code here. To work around it I modified Debug.h like this: #ifdef NDEBUG static llvm::OStream NullStream(0); #define DOUT llvm::NullStream #else #define DOUT llvm::getErrorOutputStream(DEBUG_TYPE) #endif -Dave
2007 Sep 24
4
[LLVMdev] Compilation Failure
On Sep 24, 2007, at 3:15 PM, Dale Johannesen wrote: > > On Sep 24, 2007, at 3:07 PM, Bill Wendling wrote: > >> A debug or release build? >> >> -bw > > Both, actually. Weird. I see a potential problem, though. The code is like this: void dumpToDOUT(SparseBitVector<> *bitmap) { dump(*bitmap, DOUT); } where dump expects an llvm::OStream& for the
2010 Mar 27
2
[LLVMdev] Static code generation - is it gone from LLVM 2.7?
...onPassManager, call TargetMachine::addPassesToEmitFile(), add my own MyObjectCodeWriter pass and run passes. But since LLVM 2.7 TargetMachine::addPassesToEmitFile (as implemented in LLVMTargetMachine child class) adds its own final pass (AsmPrinter) paired with either AsmStreamer, MachOStreamer or NullStreamer. I cannot pass my own descendant of MCStreamer class. Now we've got predefined set of final passes instead of free choice. AFAIK to get object code file I have to feed emitted code through my own MyMCStreamer class. The only sane option I see is to take assembly output from AsmStreamer (.s f...
2007 Sep 25
2
[LLVMdev] Compilation Failure
Hi Dave, > We ran into a similar problem in our custom code here. To work around > it I modified Debug.h like this: > > #ifdef NDEBUG > static llvm::OStream NullStream(0); > #define DOUT llvm::NullStream > #else > #define DOUT llvm::getErrorOutputStream(DEBUG_TYPE) > #endif > I thought about doing this, but there's the potential for naming conflicts that won't be caught until a release build is done. :-( I wonder, though. Would it make sens...
2010 Mar 29
0
[LLVMdev] Static code generation - is it gone from LLVM 2.7?
...tMachine::addPassesToEmitFile(), add my > own MyObjectCodeWriter pass and run passes. > > But since LLVM 2.7 TargetMachine::addPassesToEmitFile (as implemented in > LLVMTargetMachine child class) adds its own final pass (AsmPrinter) > paired with either AsmStreamer, MachOStreamer or NullStreamer. I cannot > pass my own descendant of MCStreamer class. Now we've got predefined set > of final passes instead of free choice. LLVM 2.7 doesn't have final support for this. The idea is that we'd add ELF and PECOFFStreamers as well, or parameterize it a different way. > AFA...
2010 Mar 27
0
[LLVMdev] Static code generation - is it gone from LLVM 2.7?
On Mar 27, 2010, at 12:49 PM, Peter Shugalev wrote: >>> >>> New method of emitting object code is ok for me. But it is still >>> experimental, isn't it? >> >> Yes. > > Thank you for answers! > > Now there is a way to implement what I'd like to. But it would be MUCH > better if LLVMTargetMachine::addPassesToEmitFile could take
2010 Mar 27
3
[LLVMdev] Static code generation - is it gone from LLVM 2.7?
Chris Lattner wrote: > On Mar 27, 2010, at 11:56 AM, Peter Shugalev wrote: > >>>> What exactly is expected to be coming? Will it be the same way MachO is >>>> currently implemented but with some flexibility to supply my own class >>>> to do actual object output? Or just a return of old ObjectCodeEmitter? >>> We're integrating a full assembler