Displaying 20 results from an estimated 38 matches for "raw_os_ostream".
Did you mean:
raw_fd_ostream
2010 Apr 01
2
[LLVMdev] raw_os_ostream: symbol not found
...void write(std::ostream &out) {
...
for (BasicBlock::iterator i = block->begin(), e = block->end(); i !
= e; ++i) {
Instruction *instruction = i;
out << *instruction << std::endl;
...
}
...
}
I tried working around this problem using the raw_os_ostream adapter:
#include <llvm/Support/raw_os_ostream.h>
...
raw_os_ostream raw_out(out);
raw_out << *instruction << std::endl;
It compiles fine, but opt gives a runtime error when trying to load
the pass:
Symbol not found: __ZTVN4llvm14raw_os_ostreamE
Any thoug...
2010 Apr 01
0
[LLVMdev] raw_os_ostream: symbol not found
...> for (BasicBlock::iterator i = block->begin(), e = block->end(); i !
> = e; ++i) {
> Instruction *instruction = i;
> out << *instruction << std::endl;
> ...
> }
> ...
> }
>
> I tried working around this problem using the raw_os_ostream adapter:
>
> #include <llvm/Support/raw_os_ostream.h>
> ...
> raw_os_ostream raw_out(out);
> raw_out << *instruction << std::endl;
>
> It compiles fine, but opt gives a runtime error when trying to load
> the pass:
>
> Symbol not f...
2010 Apr 02
2
[LLVMdev] raw_os_ostream: symbol not found
On Apr 1, 2010, at 3:58 PM, Chris Lattner wrote:
> It's hard to say: __ZTVN4llvm14raw_os_ostreamE is the vtable for
> raw_os_ostream. This should be provided by lib/Support/
> raw_os_ostream.cpp. Perhaps you're not linking in that .o file for
> some reason.
raw_os_ostream is definitely linked into Debug/lib/libLLVMSupport.a in
my LLVM build. (Confirmed with otool.) I'...
2012 Jan 23
3
[LLVMdev] Use printing methods of third-party libraries that use std::ostream
Hi all,
I need to use the printing methods from a third-party library. The
problem is those methods use std::cout but the use of std::ostream
methods seems to be disabled in latest versions of LLVM.
I'm aware of raw_os_ostream
(http://llvm.org/doxygen/classllvm_1_1raw__os__ostream.html) which
takes a std::ostream as input. E.g., I could do something like:
#include "llvm/Support/raw_os_ostream.h"
#include "llvm/Support/raw_ostream.h"
raw_os_ostream * rout = new raw_os_ostream(std::cout); // 1
// Fro...
2012 Jan 31
0
[LLVMdev] Use printing methods of third-party libraries that use std::ostream
Hi Jorge,
> I need to use the printing methods from a third-party library. The
> problem is those methods use std::cout but the use of std::ostream
> methods seems to be disabled in latest versions of LLVM.
>
> I'm aware of raw_os_ostream
> (http://llvm.org/doxygen/classllvm_1_1raw__os__ostream.html) which
> takes a std::ostream as input. E.g., I could do something like:
>
> #include "llvm/Support/raw_os_ostream.h"
> #include "llvm/Support/raw_ostream.h"
>
> raw_os_ostream * rout = new raw_os...
2009 Oct 02
0
[LLVMdev] llvm build errors on windows/mingw32
.../unittests/Transforms/Utils/Debug/Cloning.o -lLLVMTransformUtils -lLLVMipa -lLLVMAnalysis -lLLVMTarget -lLLVMMC -lLLVMCore -lLLVMSupport -lLLVMSystem -lpthread -lpsapi -limagehlp -lm -lGoogleTest -lUnitTestMain
d:/Home/Dim/Src/llvm/obj/Debug/lib/libGoogleTest.a(gtest.o):gtest.cc:(.text$_ZN4llvm14raw_os_ostreamC1ERSo[llvm::raw_os_ostream::raw_os_ostream(std::basic_ostre
am<char, std::char_traits<char> >&)]+0x1e): undefined reference to `vtable for llvm::raw_os_ostream'
d:/Home/Dim/Src/llvm/obj/Debug/lib/libGoogleTest.a(gtest.o):gtest.cc:(.text$_ZN4llvm23convertible_fwd_ostreamD1Ev[llvm...
2009 Oct 02
2
[LLVMdev] llvm build errors on windows/mingw32
Am 02.10.2009 um 21:07 schrieb Ronald Pijnacker:
> I had a close look at the link line, and -lpsapi is specified before
> -lLLVMSystem (which is giving the error).
> When I put -lpsapi after -lLLVMSystem, it links ok.
I commited a fix for this problem and a modified version of Jay's
patch here:
http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20090928/088265.html
I
2011 Oct 18
1
[LLVMdev] Building LLVM on PPC
...uot;, referenced from:
__ZTVN4llvm11raw_ostreamE$non_lazy_ptr in gtest.cc.o
__ZTVN4llvm11raw_ostreamE$non_lazy_ptr in gtest-death-test.cc.o
__ZTVN4llvm11raw_ostreamE$non_lazy_ptr in gtest-port.cc.o
__ZTVN4llvm11raw_ostreamE$non_lazy_ptr in gtest-typed-test.cc.o
"llvm::raw_os_ostream::~raw_os_ostream()", referenced from:
llvm::convertible_fwd_ostream::~convertible_fwd_ostream()in gtest.cc.o
llvm::convertible_fwd_ostream::~convertible_fwd_ostream()in gtest.cc.o
llvm::convertible_fwd_ostream::~convertible_fwd_ostream()in gtest-death-test.cc.o
llvm::co...
2012 Oct 22
2
[LLVMdev] Reading IR from a std::ostream
.... The write code looked like:
LLVMContext ctx;
SMDiagnostic diag;
Module *m = ParseIRFile( "my_file", diag, ctx );
However, the code I'm trying to retrofit LLVM IR into passes me just a std::ostream&. How can I read IR from a std::ostream?
I figured out how to use raw_os_ostream to adapt a std::ostream to a raw_ostream for writing a module, but there's no obvious way to adapt the code for reading, e.g., no MemoryBuffer that adapts a std::ostream (unless I missed it).
- Paul
2009 Mar 08
2
[LLVMdev] addPassesToEmitFile
...const llvm::TargetMachineRegistry::entry* _arch =
llvm::TargetMachineRegistry::getClosestTargetForJIT(Err);
std::string FeaturesStr;
std::auto_ptr<llvm::TargetMachine> target(_arch->CtorFn(*_module,
FeaturesStr));
std::ostringstream os;
llvm::raw_ostream *Out = new llvm::raw_os_ostream(os);
target->addPassesToEmitFile(*_passManager, *Out,
llvm::TargetMachine::AssemblyFile, true);
target->addPassesToEmitFileFinish(*_passManager, 0, true);
Both versions were based on the code from llc of its release.
Everything compiles perfectly in both versions. However, when the...
2012 Nov 15
0
[LLVMdev] unable to interface with target machine
...t using clang
>> functions but
>> it still caused the error.
>
> I suggest you take a look in include/llvm/Support/Host.h
>
I know about getDefaultTargetTriple().
What I don't know is how to get this information into the llvm::Module
so that it gets output with an llvm::raw_os_ostream in a way that clang
understands.
If I could use it with llvm-as without it having to make assumptions, to
build shared libraries and programs, that would be great too.
> Ciao, Duncan.
>
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at...
2009 Oct 06
0
[LLVMdev] 2.6/trunk Execution Engine question
...erToGlobal:
#include "llvm/Module.h"
#include "llvm/Function.h"
#include "llvm/InlineAsm.h"
#include "llvm/Support/IRBuilder.h"
#include "llvm/ModuleProvider.h"
#include "llvm/ExecutionEngine/ExecutionEngine.h"
#include "llvm/Support/raw_os_ostream.h"
#include "llvm/Bitcode/ReaderWriter.h"
#include "llvm/Support/raw_ostream.h"
#include "llvm/Target/TargetSelect.h"
#include "llvm/ExecutionEngine/JIT.h"
#include <assert.h>
using namespace llvm;
static raw_stdout_ostream raw_cout;
int main(i...
2012 Nov 15
2
[LLVMdev] unable to interface with target machine
On 15/11/12 10:15, Philip Ashmore wrote:
> On 15/11/12 08:58, Duncan Sands wrote:
>>> Is there a way to get the target triple of the machine the code is running on,
>>> or barring that, the machine llvm was built on?
>>
>> clang -v
>>
>> Ciao, Duncan.
>> _______________________________________________
>> LLVM Developers mailing list
>>
2009 Aug 25
3
[LLVMdev] std::cout << *MyModule does not work anymore
Daniel Dunbar <daniel at zuster.org> writes:
[snip]
>> Is all this an unintended change or an intentional one, and if the
>> later, could you direct me to something that explains what we gain on
>> exchange of this restriction?
>
> Intentional. std::ostream has long been deprecated in LLVM, each
> release has increased the degree of deprecation. The coding
2009 Mar 08
0
[LLVMdev] addPassesToEmitFile
...::entry* _arch =
> llvm::TargetMachineRegistry::getClosestTargetForJIT(Err);
>
> std::string FeaturesStr;
> std::auto_ptr<llvm::TargetMachine> target(_arch->CtorFn(*_module,
> FeaturesStr));
>
> std::ostringstream os;
> llvm::raw_ostream *Out = new llvm::raw_os_ostream(os);
> target->addPassesToEmitFile(*_passManager, *Out,
> llvm::TargetMachine::AssemblyFile, true);
> target->addPassesToEmitFileFinish(*_passManager, 0, true);
>
>
>
> Both versions were based on the code from llc of its release.
> Everything compiles perfectly...
2009 Oct 06
1
[LLVMdev] 2.6/trunk Execution Engine question
On Tue, Oct 6, 2009 at 5:49 PM, Reid Kleckner <rnk at mit.edu> wrote:
>> Also, the null pointer is coming from a call to JCE->allocateSpace().
>> This is a virtual function; I'm trying to discover what subclass it
>> is.
>
> So, there's JITEmitter::allocateSpace which overrides
> JITCodeEmitter::allocateSpace(), but *most* of the time it just calls
>
2009 Mar 09
1
[LLVMdev] addPassesToEmitFile
...m::TargetMachineRegistry::getClosestTargetForJIT(Err);
>
> > std::string FeaturesStr;
> > std::auto_ptr<llvm::TargetMachine> target(_arch->CtorFn(*_module,
> > FeaturesStr));
>
> > std::ostringstream os;
> > llvm::raw_ostream *Out = new llvm::raw_os_ostream(os);
> > target->addPassesToEmitFile(*_passManager, *Out,
> > llvm::TargetMachine::AssemblyFile, true);
> > target->addPassesToEmitFileFinish(*_passManager, 0, true);
>
> > Both versions were based on the code from llc of its release.
> > Everything comp...
2009 Nov 05
5
[LLVMdev] llvm-gcc-4.2-2.6 build failed,
...bellow:
=======================================================
In file included from ../../llvm-gcc-4.2/gcc/llvm-backend.cpp:23:
../../llvm-gcc-4.2/gcc/llvm-internal.h:40:35: error: llvm/System/DataTypes.h: No such file or directory
../../llvm-gcc-4.2/gcc/llvm-internal.h:44:41: error: llvm/Support/raw_os_ostream.h: No such file or directory
../../llvm-gcc-4.2/gcc/llvm-backend.cpp: In function ‘void createPerFunctionOptimizationPasses()’:
../../llvm-gcc-4.2/gcc/llvm-backend.cpp:671: error: ‘Less’ is not a member of ‘llvm::CodeGenOpt’
../../llvm-gcc-4.2/gcc/llvm-backend.cpp: In function ‘void llvm_asm_file_e...
2017 May 29
3
Should we split llvm Support and ADT?
2017-05-26 17:47 GMT-07:00 Zachary Turner via llvm-dev <
llvm-dev at lists.llvm.org>:
> Changing a header file somewhere and having to spend 10 minutes waiting
> for a build leads to a lot of wasted developer time.
>
> The real culprit here is tablegen. Can we split support and ADT into two
> - the parts that tablegen depends on and the parts that it doesn't?
>
2009 Mar 17
0
[LLVMdev] Printing x86 ASM for Function
Dear Maxime,
Nyx wrote:
> Hello,
>
> I would like to know how to go about printing the x86 assembly output for a
> compiled function (I'm using the JIT). I saw there is a X86IntelAsmPrinter
> on doxygen. However, it takes several arguments I don't know how to fill in.
> Is there a helper function to create such a pass? Once I have the pass
> created, do I just add it