mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-10 02:36:06 +00:00
Object, COFF: Cleanup some code in getSectionName
Use StringRef::startswith to tidy up some code, no functionality change intended. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221869 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
465237b453
commit
f7046b7244
@ -907,9 +907,9 @@ std::error_code COFFObjectFile::getSectionName(const coff_section *Sec,
|
|||||||
Name = StringRef(Sec->Name, COFF::NameSize);
|
Name = StringRef(Sec->Name, COFF::NameSize);
|
||||||
|
|
||||||
// Check for string table entry. First byte is '/'.
|
// Check for string table entry. First byte is '/'.
|
||||||
if (Name[0] == '/') {
|
if (Name.startswith("/")) {
|
||||||
uint32_t Offset;
|
uint32_t Offset;
|
||||||
if (Name[1] == '/') {
|
if (Name.startswith("//")) {
|
||||||
if (decodeBase64StringEntry(Name.substr(2), Offset))
|
if (decodeBase64StringEntry(Name.substr(2), Offset))
|
||||||
return object_error::parse_failed;
|
return object_error::parse_failed;
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user