[llvm] r179646 - C API: Add LLVMGetBufferStart()
Tom Stellard
thomas.stellard at amd.com
Tue Apr 16 16:12:48 PDT 2013
Author: tstellar
Date: Tue Apr 16 18:12:47 2013
New Revision: 179646
URL: http://llvm.org/viewvc/llvm-project?rev=179646&view=rev
Log:
C API: Add LLVMGetBufferStart()
Modified:
llvm/trunk/include/llvm-c/Core.h
llvm/trunk/lib/IR/Core.cpp
Modified: llvm/trunk/include/llvm-c/Core.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm-c/Core.h?rev=179646&r1=179645&r2=179646&view=diff
==============================================================================
--- llvm/trunk/include/llvm-c/Core.h (original)
+++ llvm/trunk/include/llvm-c/Core.h Tue Apr 16 18:12:47 2013
@@ -2579,6 +2579,7 @@ LLVMMemoryBufferRef LLVMCreateMemoryBuff
LLVMMemoryBufferRef LLVMCreateMemoryBufferWithMemoryRangeCopy(const char *InputData,
size_t InputDataLength,
const char *BufferName);
+const char* LLVMGetBufferStart(LLVMMemoryBufferRef MemBuf);
void LLVMDisposeMemoryBuffer(LLVMMemoryBufferRef MemBuf);
/**
Modified: llvm/trunk/lib/IR/Core.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/IR/Core.cpp?rev=179646&r1=179645&r2=179646&view=diff
==============================================================================
--- llvm/trunk/lib/IR/Core.cpp (original)
+++ llvm/trunk/lib/IR/Core.cpp Tue Apr 16 18:12:47 2013
@@ -2455,6 +2455,9 @@ LLVMMemoryBufferRef LLVMCreateMemoryBuff
StringRef(BufferName)));
}
+const char* LLVMGetBufferStart(LLVMMemoryBufferRef MemBuf) {
+ return unwrap(MemBuf)->getBufferStart();
+}
void LLVMDisposeMemoryBuffer(LLVMMemoryBufferRef MemBuf) {
delete unwrap(MemBuf);
More information about the llvm-commits
mailing list