Object, COFF: Cleanup some code in getSectionName

Use StringRef::startswith to tidy up some code, no functionality change
intended.

llvm-svn: 221869
This commit is contained in:
David Majnemer 2014-11-13 07:42:09 +00:00
parent 58323a9763
commit 2314b3defa
1 changed files with 2 additions and 2 deletions

View File

@ -907,9 +907,9 @@ std::error_code COFFObjectFile::getSectionName(const coff_section *Sec,
Name = StringRef(Sec->Name, COFF::NameSize);
// Check for string table entry. First byte is '/'.
if (Name[0] == '/') {
if (Name.startswith("/")) {
uint32_t Offset;
if (Name[1] == '/') {
if (Name.startswith("//")) {
if (decodeBase64StringEntry(Name.substr(2), Offset))
return object_error::parse_failed;
} else {