mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-14 00:32:55 +00:00
Replace a temporary std::string with SmallString.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97259 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
621a415c01
commit
aabc26c4d5
@ -174,7 +174,8 @@ MemoryBuffer *MemoryBuffer::getFile(StringRef Filename, std::string *ErrStr,
|
||||
#ifdef O_BINARY
|
||||
OpenFlags |= O_BINARY; // Open input file in binary mode on win32.
|
||||
#endif
|
||||
int FD = ::open(Filename.str().c_str(), O_RDONLY|OpenFlags);
|
||||
SmallString<256> PathBuf(Filename.begin(), Filename.end());
|
||||
int FD = ::open(PathBuf.c_str(), O_RDONLY|OpenFlags);
|
||||
if (FD == -1) {
|
||||
if (ErrStr) *ErrStr = strerror(errno);
|
||||
return 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user