[llvm-commits] [llvm] r50908 - /llvm/trunk/tools/lto2/LTOModule.cpp
Nick Kledzik
kledzik at apple.com
Fri May 9 11:44:41 PDT 2008
Author: kledzik
Date: Fri May 9 13:44:41 2008
New Revision: 50908
URL: http://llvm.org/viewvc/llvm-project?rev=50908&view=rev
Log:
use doxygen comments for makeBuffer()
Modified:
llvm/trunk/tools/lto2/LTOModule.cpp
Modified: llvm/trunk/tools/lto2/LTOModule.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/lto2/LTOModule.cpp?rev=50908&r1=50907&r2=50908&view=diff
==============================================================================
--- llvm/trunk/tools/lto2/LTOModule.cpp (original)
+++ llvm/trunk/tools/lto2/LTOModule.cpp Fri May 9 13:44:41 2008
@@ -91,12 +91,12 @@
return makeLTOModule(buffer.get(), errMsg);
}
-
+/// makeBuffer - create a MemoryBuffer from a memory range.
+/// MemoryBuffer requires the byte past end of the buffer to be a zero.
+/// We might get lucky and already be that way, otherwise make a copy.
+/// Also if next byte is on a different page, don't assume it is readable.
MemoryBuffer* LTOModule::makeBuffer(const void* mem, size_t length)
{
- // MemoryBuffer requires the byte past end of the buffer to be a zero.
- // We might get lucky and already be that way, otherwise make a copy.
- // Also if next byte is on a different page, don't assume it is readable.
const char* startPtr = (char*)mem;
const char* endPtr = startPtr+length;
if ( (((uintptr_t)endPtr & (sys::Process::GetPageSize()-1)) == 0)
More information about the llvm-commits
mailing list