search for: supportsseeking

Displaying 18 results from an estimated 18 matches for "supportsseeking".

2016 Feb 19
3
raw_pwrite_stream to string or stdout?
TargetMachine::addPassesToEmitFile(..) requires as its 2nd argument an raw_pwrite_stream. Is it possible to create such a thing which either writes into a standard string or streams to outs() ? Thanks,
2016 Feb 22
2
raw_pwrite_stream to string or stdout?
Note that raw_fd_ostream is not seekable, and hence will not be suitable as addPassesToEmitFile output stream. 2016-02-22 18:27 GMT+02:00 Rafael EspĂ­ndola <llvm-dev at lists.llvm.org>: > On 22 February 2016 at 11:16, Frank Winter <fwinter at jlab.org> wrote: > > TargetMachine::CGFT_AssemblyFile is exactly what I am trying to write > out. > > I see. > > For
2016 Mar 23
2
Help with pass manager
...letype != obj"; { raw_pwrite_stream *outstream = &objoutstream->os(); SmallVector<char, 0> filebuf; std::unique_ptr<raw_svector_ostream> BOS; if ((FileType != TargetMachine::CGFT_AssemblyFile && !objoutstream->os().supportsSeeking())) { BOS = make_unique<raw_svector_ostream>(filebuf); outstream = BOS.get(); } AnalysisID StartBeforeID = nullptr; AnalysisID StartAfterID = nullptr; AnalysisID StopAfterID = nullptr; const PassRegistry *PR = PassRegist...
2016 Mar 24
2
Help with pass manager
...raw_pwrite_stream *outstream = &objoutstream->os(); >> >> SmallVector<char, 0> filebuf; >> std::unique_ptr<raw_svector_ostream> BOS; >> if ((FileType != TargetMachine::CGFT_AssemblyFile && !objoutstream->os().supportsSeeking())) { >> BOS = make_unique<raw_svector_ostream>(filebuf); >> outstream = BOS.get(); >> } >> >> AnalysisID StartBeforeID = nullptr; >> AnalysisID StartAfterID = nullptr; >> AnalysisID Sto...
2016 Mar 24
0
Help with pass manager
...{ > raw_pwrite_stream *outstream = &objoutstream->os(); > > SmallVector<char, 0> filebuf; > std::unique_ptr<raw_svector_ostream> BOS; > if ((FileType != TargetMachine::CGFT_AssemblyFile && !objoutstream->os().supportsSeeking())) { > BOS = make_unique<raw_svector_ostream>(filebuf); > outstream = BOS.get(); > } > > AnalysisID StartBeforeID = nullptr; > AnalysisID StartAfterID = nullptr; > AnalysisID StopAfterID = nullptr; >...
2016 Mar 24
2
Help with pass manager
...= &objoutstream->os(); >>>> >>>> SmallVector<char, 0> filebuf; >>>> std::unique_ptr<raw_svector_ostream> BOS; >>>> if ((FileType != TargetMachine::CGFT_AssemblyFile && !objoutstream->os().supportsSeeking())) { >>>> BOS = make_unique<raw_svector_ostream>(filebuf); >>>> outstream = BOS.get(); >>>> } >>>> >>>> AnalysisID StartBeforeID = nullptr; >>>> AnalysisID StartAf...
2016 Mar 24
0
Help with pass manager
...tream *outstream = &objoutstream->os(); >>> >>> SmallVector<char, 0> filebuf; >>> std::unique_ptr<raw_svector_ostream> BOS; >>> if ((FileType != TargetMachine::CGFT_AssemblyFile && !objoutstream->os().supportsSeeking())) { >>> BOS = make_unique<raw_svector_ostream>(filebuf); >>> outstream = BOS.get(); >>> } >>> >>> AnalysisID StartBeforeID = nullptr; >>> AnalysisID StartAfterID = nullptr; >&gt...
2016 Mar 24
2
Help with pass manager
...gt;>>>>> >>>>>> SmallVector<char, 0> filebuf; >>>>>> std::unique_ptr<raw_svector_ostream> BOS; >>>>>> if ((FileType != TargetMachine::CGFT_AssemblyFile && !objoutstream->os().supportsSeeking())) { >>>>>> BOS = make_unique<raw_svector_ostream>(filebuf); >>>>>> outstream = BOS.get(); >>>>>> } >>>>>> >>>>>> AnalysisID StartBeforeID = nullptr; &gt...
2016 May 21
1
Using an MCStreamer Directly to produce an object file?
...buffer: std::string ofile("/home/users/avose/hpcgp/hpcgp_rundir/tmp.o"); std::unique_ptr<tool_output_file> Out = GetOutputStream(ofile); if (!Out) { return 1; } std::unique_ptr<buffer_ostream> BOS; raw_pwrite_stream *OS = &Out->os(); if (!Out->os().supportsSeeking()) { BOS = make_unique<buffer_ostream>(Out->os()); OS = BOS.get(); } This also seems to do OK. Now I would think I can finally get around to making the code emitter and the MCStreamer: MCCodeEmitter *CE = TheTarget->createMCCodeEmitter(*MCII, *MRI, Ctx); MCAsmBackend *...
2016 Mar 24
0
Help with pass manager
...ream->os(); >>>>> >>>>> SmallVector<char, 0> filebuf; >>>>> std::unique_ptr<raw_svector_ostream> BOS; >>>>> if ((FileType != TargetMachine::CGFT_AssemblyFile && !objoutstream->os().supportsSeeking())) { >>>>> BOS = make_unique<raw_svector_ostream>(filebuf); >>>>> outstream = BOS.get(); >>>>> } >>>>> >>>>> AnalysisID StartBeforeID = nullptr; >>>>>...
2016 Feb 22
2
raw_pwrite_stream to string or stdout?
...write_stream. >> >> Is it possible to create such a thing which either writes into a standard >> string or streams to outs() ? > > > I would suggest doing what llc does: > > if ((FileType != TargetMachine::CGFT_AssemblyFile && > !Out->os().supportsSeeking()) || > CompileTwice) { > BOS = make_unique<raw_svector_ostream>(Buffer); > OS = BOS.get(); > } > > That will work even with redirects. > > Cheers, > Rafael >
2016 Mar 24
2
Help with pass manager
...>>>>>>>> SmallVector<char, 0> filebuf; >>>>>>>> std::unique_ptr<raw_svector_ostream> BOS; >>>>>>>> if ((FileType != TargetMachine::CGFT_AssemblyFile && !objoutstream->os().supportsSeeking())) { >>>>>>>> BOS = make_unique<raw_svector_ostream>(filebuf); >>>>>>>> outstream = BOS.get(); >>>>>>>> } >>>>>>>> >>>>>>>>...
2016 Mar 24
0
Help with pass manager
...gt;>> >>>>>>> SmallVector<char, 0> filebuf; >>>>>>> std::unique_ptr<raw_svector_ostream> BOS; >>>>>>> if ((FileType != TargetMachine::CGFT_AssemblyFile && !objoutstream->os().supportsSeeking())) { >>>>>>> BOS = make_unique<raw_svector_ostream>(filebuf); >>>>>>> outstream = BOS.get(); >>>>>>> } >>>>>>> >>>>>>> AnalysisID StartBef...
2016 Mar 24
0
Help with pass manager
...;>>>>>>>> SmallVector<char, 0> filebuf; >>>>>>>>> std::unique_ptr<raw_svector_ostream> BOS; >>>>>>>>> if ((FileType != TargetMachine::CGFT_AssemblyFile && !objoutstream->os().supportsSeeking())) { >>>>>>>>> BOS = make_unique<raw_svector_ostream>(filebuf); >>>>>>>>> outstream = BOS.get(); >>>>>>>>> } >>>>>>>>> >>>>>>...
2016 Mar 24
2
Help with pass manager
...;>>>>>> SmallVector<char, 0> filebuf; >>>>>>>>>> std::unique_ptr<raw_svector_ostream> BOS; >>>>>>>>>> if ((FileType != TargetMachine::CGFT_AssemblyFile && !objoutstream->os().supportsSeeking())) { >>>>>>>>>> BOS = make_unique<raw_svector_ostream>(filebuf); >>>>>>>>>> outstream = BOS.get(); >>>>>>>>>> } >>>>>>>>>> >>...
2016 Mar 24
0
Help with pass manager
...;>>>> SmallVector<char, 0> filebuf; >>>>>>>>>>> std::unique_ptr<raw_svector_ostream> BOS; >>>>>>>>>>> if ((FileType != TargetMachine::CGFT_AssemblyFile && !objoutstream->os().supportsSeeking())) { >>>>>>>>>>> BOS = make_unique<raw_svector_ostream>(filebuf); >>>>>>>>>>> outstream = BOS.get(); >>>>>>>>>>> } >>>>>>>>>>>...
2016 Mar 30
1
Help with pass manager
...;>> SmallVector<char, 0> filebuf; >>>>>>>>>>>> std::unique_ptr<raw_svector_ostream> BOS; >>>>>>>>>>>> if ((FileType != TargetMachine::CGFT_AssemblyFile && !objoutstream->os().supportsSeeking())) { >>>>>>>>>>>> BOS = make_unique<raw_svector_ostream>(filebuf); >>>>>>>>>>>> outstream = BOS.get(); >>>>>>>>>>>> } >>>>>>>>&g...
2016 May 23
0
Using an MCStreamer Directly to produce an object file?