From db18f328d72b2b010b1c55f2ec4a22913cff0ce5 Mon Sep 17 00:00:00 2001 From: Nick Kledzik Date: Fri, 9 May 2008 18:44:41 +0000 Subject: use doxygen comments for makeBuffer() llvm-svn: 50908 --- llvm/tools/lto2/LTOModule.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/llvm/tools/lto2/LTOModule.cpp b/llvm/tools/lto2/LTOModule.cpp index 943bef75c87..cc3b1f142dc 100644 --- a/llvm/tools/lto2/LTOModule.cpp +++ b/llvm/tools/lto2/LTOModule.cpp @@ -91,12 +91,12 @@ LTOModule* LTOModule::makeLTOModule(const char* path, std::string& errMsg) 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) -- cgit v1.2.3