search for: memorybuff

Displaying 20 results from an estimated 300 matches for "memorybuff".

Did you mean: memorybuffer
2008 Sep 06
2
[LLVMdev] "has different visibility" warnings
Recently I started getting these warnings - thousands of them - and I'm not sure what I did to cause them or how to solve them: ld: warning llvm::MemoryBuffer::getBufferStart() const has different visibility (1) in /usr/local/lib/libLLVMSupport.a(MemoryBuffer.o) and (2) in /usr/local/lib/libLLVMSupport.a(CommandLine.o) ld: warning llvm::OwningPtr<llvm::MemoryBuffer>::OwningPtr(llvm::MemoryBuffer*)has different visibility (1) in /usr/local/li...
2017 Mar 16
4
Sharing MemoryBuffers between front ends and LLVM
Hi all, I'm implementing interleaved source in assembly output. Early reviews raised the concern that the current implementation will be opening files (using a llvm::MemoryBuffer) that are likely to be in the memory of the front end (commonly clang but I think we want this to be front end agnostic). I'm now exploring ideas to avoid reopening files and let LLVM reuse the files the FE had to open. I am assuming that the front end will use llvm::MemoryBuffer (e.g.: cl...
2008 Sep 06
0
[LLVMdev] "has different visibility" warnings
http://lists.cs.uiuc.edu/pipermail/llvmdev/2008-August/016763.html On 2008-09-05, at 22:46, Talin wrote: > Recently I started getting these warnings - thousands of them - and > I'm > not sure what I did to cause them or how to solve them: > > ld: warning llvm::MemoryBuffer::getBufferStart() const has different > visibility (1) in /usr/local/lib/libLLVMSupport.a(MemoryBuffer.o) and > (2) in /usr/local/lib/libLLVMSupport.a(CommandLine.o) > ld: warning > llvm::OwningPtr<llvm::MemoryBuffer>::OwningPtr(llvm::MemoryBuffer*)has > different visibility...
2014 Mar 19
2
[LLVMdev] load bytecode from string for jiting problem
all of: ---- // cout << "lsr: " << lsr << "\n"; llvm::MemoryBuffer* mbjit = llvm::MemoryBuffer::getMemBufferCopy (sr); ------ string lsr = sr.str(); // cout << "lsr: " << lsr << "\n"; llvm::MemoryBuffer* mbjit =...
2014 Mar 20
2
[LLVMdev] load bytecode from string for jiting problem
...if (sr.str()[2] == (char) 0xc0) std::cout << "0xc0 ok\n"; if (sr.str()[3] == (char) 0xde) std::cout << "0xde ok\n"; llvm::MemoryBuffer* mbjit = llvm::MemoryBuffer::getMemBufferCopy (sr); llvm::ErrorOr<llvm::Module*> ModuleOrErr = llvm::parseBitcodeFile (mbjit, context); if (llvm::error_code EC = ModuleOrErr.getError()) { std::cout << ModuleOrErr.getError().message() << "\n"; } Module* Mjit = M...
2009 Sep 24
7
[LLVMdev] MemoryBuffer
I was writing something using MemoryBuffer, and while looking through its code I came across line 59: assert(BufEnd[0] == 0 && "Buffer is not null terminated!"); I am curious if the MemoryBuffer only supports non-binary, non-null embedded files, or if it supports binary as well. I do not see anything inherently not ex...
2014 Mar 20
2
[LLVMdev] load bytecode from string for jiting problem
...t etu.unistra.fr>wrote: > The stack trace is: > (gdb) bt > #0 0x00000000004fa8c8 in llvm::BitstreamCursor::Read(unsigned int) () > #1 0x00000000004fa1d2 in llvm::BitcodeReader:: > ParseBitcodeInto(llvm::Module*) () > #2 0x0000000000503ae9 in llvm::getLazyBitcodeModule(llvm::MemoryBuffer*, > llvm::LLVMContext&) () > #3 0x0000000000503eb6 in llvm::parseBitcodeFile(llvm::MemoryBuffer*, > llvm::LLVMContext&) () > #4 0x00000000004ec195 in jitter (skeletons=<optimized out>, > params=0x7fffffffdf40, phi_state=0x11adbc0, lower=0, upper=250, > inst_outer...
2013 Jan 14
2
[LLVMdev] Need some brief explanation about llvm::MemoryBuffer and llvm::SourceMgr
Hello list, I learned that under LLVM, #including of <iostream> is forbidden. Instead LLVM provides llvm::raw_ostream(for std::cout, std::cerr) and llvm::MemoryBuffer(for input stream). And using of llvm::raw_ostream is pretty easy but for me learning of how to use llvm::MemoryBuffer is pretty much difficult. I found a good sample code; utils/yaml2obj/yaml2obj.cpp. The function, main() in this file provides a hint which is not enough for me though. I still...
2009 Sep 24
0
[LLVMdev] MemoryBuffer
On Thu, Sep 24, 2009 at 2:32 PM, Chris Lattner <clattner at apple.com> wrote: > > On Sep 24, 2009, at 1:23 PM, OvermindDL1 wrote: > >> I was writing something using MemoryBuffer, and while looking through >> its code I came across line 59: >> assert(BufEnd[0] == 0 && "Buffer is not null terminated!"); >> I am curious if the MemoryBuffer only supports non-binary, non-null >> embedded files, or if it supports binary as well. I do...
2013 Jan 15
2
[LLVMdev] Need some brief explanation about llvm::MemoryBuffer and llvm::SourceMgr
...t user prompts with the LLVM APIs. This info helps me a lot. I tried to do a thing that is not possible. Thank you very much. Sincerely Journeyer 2013/1/15 Justin Holewinski <justin.holewinski at gmail.com>: > Is this for user prompts, or just reading data from stdin? You can use > MemoryBuffer::getSTDIN to read the contents of stdin into a memory buffer. > Then you can get the data pointer and size and read it in. As far as I > know, there is not a good way to implement user prompts with the LLVM APIs. > > > On Mon, Jan 14, 2013 at 4:57 AM, Journeyer J. Joh <oosaprog...
2014 Mar 19
2
[LLVMdev] load bytecode from string for jiting problem
...std::cout << "C ok\n"; >> if (sr.str()[2] == (char) 0xc0) >> std::cout << "0xc0 ok\n"; >> if (sr.str()[3] == (char) 0xde) >> std::cout << "0xde ok\n"; >> >> 3) I try to parse the gv by >> MemoryBuffer* mbjit = MemoryBuffer::getMemBuffer (sr.str()); > > Not sure if this is your issue, but should be fixed anyway: > > The std::string created by "sr.str()" ends its lifetime in this > statement, and MemoryBuffer for efficiency reasons > avoids copying data it doesn't...
2013 Jan 15
0
[LLVMdev] Need some brief explanation about llvm::MemoryBuffer and llvm::SourceMgr
...helps me a lot. > I tried to do a thing that is not possible. > > Thank you very much. > > Sincerely > Journeyer > > 2013/1/15 Justin Holewinski <justin.holewinski at gmail.com>: >> Is this for user prompts, or just reading data from stdin? You can use >> MemoryBuffer::getSTDIN to read the contents of stdin into a memory buffer. >> Then you can get the data pointer and size and read it in. As far as I >> know, there is not a good way to implement user prompts with the LLVM APIs. >> >> >> On Mon, Jan 14, 2013 at 4:57 AM, Journeyer...
2016 Nov 17
3
UB in MemoryBufferMMapFile
In MemoryBuffer::init, we have an assert that reads the memory at `BufEnd`, which is one past the end of some memory region: from lib/Support/MemoryBuffer.cpp:45: > void MemoryBuffer::init(const char *BufStart, const char *BufEnd, > bool RequiresNullTerminator) { > assert((!Re...
2013 Jan 14
0
[LLVMdev] Need some brief explanation about llvm::MemoryBuffer and llvm::SourceMgr
Is this for user prompts, or just reading data from stdin? You can use MemoryBuffer::getSTDIN to read the contents of stdin into a memory buffer. Then you can get the data pointer and size and read it in. As far as I know, there is not a good way to implement user prompts with the LLVM APIs. On Mon, Jan 14, 2013 at 4:57 AM, Journeyer J. Joh <oosaprogrammer at gmail.com&gt...
2014 Dec 03
2
[LLVMdev] [lld] need to figure out if file is an archive member and record more information...
On 12/2/2014 11:19 PM, Rui Ueyama wrote: > Do you have to know whether a MemoryBuffer was in a library or not during > parsing that MemoryBuffer? Yes, I need to know that while parsing the buffer too. > > If not, we could just set a library name to a File in > FileArchive::instantiateMember after we call _registry.parseFile. > > On Tue, Dec 2, 2014 at 9:08 PM, Sh...
2009 Sep 24
0
[LLVMdev] MemoryBuffer
...ize. > > On 2009-09-24, at 16:44, OvermindDL1 wrote: > >> On Thu, Sep 24, 2009 at 2:32 PM, Chris Lattner <clattner at apple.com> >> wrote: >>> >>> On Sep 24, 2009, at 1:23 PM, OvermindDL1 wrote: >>> >>>> I was writing something using MemoryBuffer, and while looking >>>> through >>>> its code I came across line 59: >>>> assert(BufEnd[0] == 0 && "Buffer is not null terminated!"); >>>> I am curious if the MemoryBuffer only supports non-binary, non-null >>>> embedde...
2017 Mar 17
2
Sharing MemoryBuffers between front ends and LLVM
...ntend enabling this interleaved output mode? I'm not sure this has been really discussed in the review yet (although there certainly is a proposed mechanism in the patches). -Hal > > — > Mehdi > > >> that the current implementation will be opening files (using a llvm::MemoryBuffer) that are likely to be in the memory of the front end (commonly clang but I think we want this to be front end agnostic). >> >> I'm now exploring ideas to avoid reopening files and let LLVM reuse the files the FE had to open. >> >> I am assuming that the front end will...
2010 Oct 01
0
[LLVMdev] LLVM-2.7 to 2.8 subtle change: MemoryBuffer::getMemBuffer
Hi guys, In porting our project over to LLVM-2.8 today I ran into a change that should probably go in the 2.8 release notes. After r100485, the MemoryBuffer::getMemBuffer went from: /// getMemBuffer - Open the specified memory range as a MemoryBuffer. Note /// that EndPtr[0] must be a null byte and be accessible! static MemoryBuffer *getMem...
2011 Feb 24
0
[LLVMdev] MemoryBuffer and its requirement for NULL termination
MemoryBuffer requires that its buffer be NULL terminated. This is handy for some users, but it is a hard requirement for some cases. For example, currently I get the following valgrind error when doing LTO and fetching an archive member: at 0x6DAC36E: llvm::MemoryBuffer::init(char const*, char const*) (M...
2010 Apr 27
0
[LLVMdev] LLVM 2.7 build failure: no matching function for call to 'llvm::MemoryBuffer::getFile
...c.cpp for Release build llvm[4]: Compiling FileManager.cpp for Release build llvm[4]: Compiling IdentifierTable.cpp for Release build llvm[4]: Compiling SourceLocation.cpp for Release build llvm[4]: Compiling SourceManager.cpp for Release build SourceManager.cpp: In member function 'const llvm::MemoryBuffer* clang::SrcMgr::ContentCache::getBuffer(clang::Diagnostic&, const clang::SourceManager&, clang::SourceLocation, bool*) const': SourceManager.cpp:74: error: no matching function for call to 'llvm::MemoryBuffer::getFile(const char*, std::string*, off_t, stat*)' /usr/local/src/ll...