mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-13 20:32:21 +00:00
random comment cleanups.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131829 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
efce071fd6
commit
9bb4a2ae8a
@ -81,7 +81,7 @@ public:
|
|||||||
bool RequiresNullTerminator = true);
|
bool RequiresNullTerminator = true);
|
||||||
|
|
||||||
/// getMemBuffer - Open the specified memory range as a MemoryBuffer. Note
|
/// getMemBuffer - Open the specified memory range as a MemoryBuffer. Note
|
||||||
/// that InputData must be null terminated.
|
/// that InputData must be null terminated if RequiresNullTerminator is true.
|
||||||
static MemoryBuffer *getMemBuffer(StringRef InputData,
|
static MemoryBuffer *getMemBuffer(StringRef InputData,
|
||||||
StringRef BufferName = "",
|
StringRef BufferName = "",
|
||||||
bool RequiresNullTerminator = true);
|
bool RequiresNullTerminator = true);
|
||||||
|
@ -67,7 +67,7 @@ static void CopyStringRef(char *Memory, StringRef Data) {
|
|||||||
|
|
||||||
/// GetNamedBuffer - Allocates a new MemoryBuffer with Name copied after it.
|
/// GetNamedBuffer - Allocates a new MemoryBuffer with Name copied after it.
|
||||||
template <typename T>
|
template <typename T>
|
||||||
static T* GetNamedBuffer(StringRef Buffer, StringRef Name,
|
static T *GetNamedBuffer(StringRef Buffer, StringRef Name,
|
||||||
bool RequiresNullTerminator) {
|
bool RequiresNullTerminator) {
|
||||||
char *Mem = static_cast<char*>(operator new(sizeof(T) + Name.size() + 1));
|
char *Mem = static_cast<char*>(operator new(sizeof(T) + Name.size() + 1));
|
||||||
CopyStringRef(Mem + sizeof(T), Name);
|
CopyStringRef(Mem + sizeof(T), Name);
|
||||||
@ -94,7 +94,7 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// getMemBuffer - Open the specified memory range as a MemoryBuffer. Note
|
/// getMemBuffer - Open the specified memory range as a MemoryBuffer. Note
|
||||||
/// that EndPtr[0] must be a null byte and be accessible!
|
/// that InputData must be a null terminated if RequiresNullTerminator is true!
|
||||||
MemoryBuffer *MemoryBuffer::getMemBuffer(StringRef InputData,
|
MemoryBuffer *MemoryBuffer::getMemBuffer(StringRef InputData,
|
||||||
StringRef BufferName,
|
StringRef BufferName,
|
||||||
bool RequiresNullTerminator) {
|
bool RequiresNullTerminator) {
|
||||||
@ -221,9 +221,9 @@ error_code MemoryBuffer::getFile(const char *Filename,
|
|||||||
OpenFlags |= O_BINARY; // Open input file in binary mode on win32.
|
OpenFlags |= O_BINARY; // Open input file in binary mode on win32.
|
||||||
#endif
|
#endif
|
||||||
int FD = ::open(Filename, OpenFlags);
|
int FD = ::open(Filename, OpenFlags);
|
||||||
if (FD == -1) {
|
if (FD == -1)
|
||||||
return error_code(errno, posix_category());
|
return error_code(errno, posix_category());
|
||||||
}
|
|
||||||
error_code ret = getOpenFile(FD, Filename, result, FileSize, FileSize,
|
error_code ret = getOpenFile(FD, Filename, result, FileSize, FileSize,
|
||||||
0, RequiresNullTerminator);
|
0, RequiresNullTerminator);
|
||||||
close(FD);
|
close(FD);
|
||||||
|
Loading…
Reference in New Issue
Block a user