search for: membuf

Displaying 10 results from an estimated 10 matches for "membuf".

Did you mean: mem_buf
2007 Dec 26
2
[LLVMdev] Instantiating modules from .bc files
....bc files for really simple functions and it seems to do quite well at that, but I've been trying to figure out how to take the output from llvm-gcc and actually use it in another program. I tried to get a module out of a file that I'd read in to it using this code: MemoryBuffer* memBuf = MemoryBuffer::getFile(filename, sizeof filename, &errStr); printf("errStr: %s\n", errStr.c_str()); BitcodeReader::BitcodeReader bcReader(memBuf); Module* Mod = bcReader.materializeModule(&errInfo); printf("errInfo: %s\n", errInfo.c_str()); verifyModule(*Mod, PrintM...
2007 Dec 26
0
[LLVMdev] Instantiating modules from .bc files
...coding of the LLVM IR within the bitstream are private to the reader and writer modules. The functions exposed in ReaderWriter.h are the public interface to that functionality. > I tried to get a module out of a file that I'd read in to it using > this code: > > MemoryBuffer* memBuf = MemoryBuffer::getFile(filename, sizeof > filename, &errStr); > printf("errStr: %s\n", errStr.c_str()); > BitcodeReader::BitcodeReader bcReader(memBuf); > Module* Mod = bcReader.materializeModule(&errInfo); > printf("errInfo: %s\n", errInfo.c_str()); >...
2008 May 22
3
[LLVMdev] How to get a return type of a function with LLVM-C API
Hi LLVM-ers, I am trying to get a return type of a function(from bitcode file) with LLVM-C API, but there seems no appropriate API to do that. I've tried to do that with following code, ---- LLVMModuleRef M; LLVMMemoryBufferRef MemBuf; LLVMValueRef F; // Function LLVMTypeRef RetTy; char *ErrStr; // // -- Load shader module // ret = LLVMCreateMemoryBufferWithContentsOfFile( input, &MemBuf, // [out] &ErrStr); // [out] ret = LLVMParseBitcode(...
2007 Dec 27
1
[LLVMdev] Instantiating modules from .bc files
...he bitstream are > private to the reader and writer modules. The functions exposed in > ReaderWriter.h are the public interface to that functionality. > >> I tried to get a module out of a file that I'd read in to it using >> this code: >> >> MemoryBuffer* memBuf = MemoryBuffer::getFile(filename, sizeof >> filename, &errStr); >> printf("errStr: %s\n", errStr.c_str()); >> BitcodeReader::BitcodeReader bcReader(memBuf); >> Module* Mod = bcReader.materializeModule(&errInfo); >> printf("errInfo: %s\n", er...
2016 Sep 12
2
Counterintuitive use of LLVMBool in C-API?
Hi, I stumbled across the following: > /* Builds a module from the bitcode in the specified memory buffer, > returning a > reference to the module via the OutModule parameter. Returns 0 on success. > */ > LLVMBool LLVMParseBitcode2(LLVMMemoryBufferRef MemBuf, > LLVMModuleRef *OutModule); However in most scenarios i know, a Bool is something like 0 = False !0 = True In short: is it just me or is this really counterintuitive? -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/...
2016 Sep 12
1
Counterintuitive use of LLVMBool in C-API?
...: > > > > I stumbled across the following: > > /* Builds a module from the bitcode in the specified memory buffer, > returning a > > reference to the module via the OutModule parameter. Returns 0 on > success. */ > > LLVMBool LLVMParseBitcode2(LLVMMemoryBufferRef MemBuf, > > LLVMModuleRef *OutModule); > > However in most scenarios i know, a Bool is something like > > 0 = False > > !0 = True > > > > In short: is it just me or is this really counterintuitive? > > It is counterintuitive, but it is also consistent with a lot o...
2007 Dec 02
1
[LLVMdev] reading & writing bitcode from non file, e.g. GDBM store (or MySQL database)
..., for example inside GDBM entries (or inside MySQL databases). Apparently, I can read a module from a GDBM store with something like (all error handling is skipped) datum keyd, vald; // GDBM key & value // fill keyd appropriately vald = gdbm_fetch (bark_gdbm, keyd); MemoryBuffer* membuf = MemoryBuffer::getMemBuffer(vald.dptr, vald.dptr+vald.dsize, bufnam); Module* lmodu = ParseBitcodeFile(membuf, &errmsg); // do something appropriate with the llvm module lmodu Unfortunately, there is no way of dumping into memory, except by going thru a stdc++ memory output buffer...
2017 Sep 18
0
Counterintuitive use of LLVMBool in C-API?
...; I stumbled across the following: >> > /* Builds a module from the bitcode in the specified memory buffer, >> returning a >> > reference to the module via the OutModule parameter. Returns 0 on >> success. */ >> > LLVMBool LLVMParseBitcode2(LLVMMemoryBufferRef MemBuf, >> > LLVMModuleRef *OutModule); >> > However in most scenarios i know, a Bool is something like >> > 0 = False >> > !0 = True >> > >> > In short: is it just me or is this really counterintuitive? >> >> It is counterintuitive, but it...
2011 Mar 08
3
How to disable R's crash prompt
Dear R devel, I have a C++ app that calls into embedded R to perform some analytic calculations. When my app encounters a segmentation fault, R always prints the following crash prompt and asks me to enter an action: *** caught segfault *** address 0x8, cause 'memory not mapped' Possible actions: 1: abort (with core dump, if enabled) 2: normal R exit 3: exit R without saving workspace
2005 May 26
14
htb: HowTo identify squid cache hits
Hi list... I work for a school in the netherlands with a 2mbit Internet uplink and about 3800 eager student who want to play games on the Internet using one of our 800 workstations. Problem was that those game playing students are concentrated in 2 of our 6 physical locations... and they consumed the bandwidth which the other location would like to use for educational purposes. The thing we did