Solomon Boulos
2010-Oct-01 23:28 UTC
[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 *getMemBuffer(const char *StartPtr, const char *EndPtr,
const char *BufferName = "");
to the current (after the StringRef change to BufferName too)
/// getMemBuffer - Open the specified memory range as a MemoryBuffer. Note
/// that EndPtr[0] must be a null byte and be accessible!
static MemoryBuffer *getMemBuffer(StringRef InputData,
StringRef BufferName = "");
Like the code in clang, our code was using MemoryBuffer::getMemBuffer(start,
start + size) which unfortunately automatically translates into the pair of
StringRef version (leading to a confusing error about an invalid header in the
bitcode). Worse yet the doxygen comment isn't up to date either.
I assume there could be more const char* to StringRef related issues throughout
the code like this one, but we don't seem to have triggered any others.
Solomon
Apparently Analagous Threads
- [LLVMdev] MemoryBuffer
- [PATCH] Remove local_strtoull, windows has equivalent function _strtoui64
- Branch 'interpreter' - 4 commits - libswfdec/js libswfdec/swfdec_bits.c libswfdec/swfdec_bits.h libswfdec/swfdec_codec_screen.c libswfdec/swfdec_image.c libswfdec/swfdec_script.c libswfdec/swfdec_swf_decoder.c libswfdec/swfdec_tag.c
- openssh2.3.0p1 and /etc/limits
- [PATCH 2/3] ringtest: support test specific parameters
