C API: Add LLVMGetBufferSize()

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179647 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Tom Stellard 2013-04-16 23:12:51 +00:00
parent 4074343b2d
commit edc93b356d
2 changed files with 5 additions and 0 deletions

View File

@ -2580,6 +2580,7 @@ LLVMMemoryBufferRef LLVMCreateMemoryBufferWithMemoryRangeCopy(const char *InputD
size_t InputDataLength,
const char *BufferName);
const char* LLVMGetBufferStart(LLVMMemoryBufferRef MemBuf);
size_t LLVMGetBufferSize(LLVMMemoryBufferRef MemBuf);
void LLVMDisposeMemoryBuffer(LLVMMemoryBufferRef MemBuf);
/**

View File

@ -2459,6 +2459,10 @@ const char* LLVMGetBufferStart(LLVMMemoryBufferRef MemBuf) {
return unwrap(MemBuf)->getBufferStart();
}
size_t LLVMGetBufferSize(LLVMMemoryBufferRef MemBuf) {
return unwrap(MemBuf)->getBufferSize();
}
void LLVMDisposeMemoryBuffer(LLVMMemoryBufferRef MemBuf) {
delete unwrap(MemBuf);
}