mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-24 22:24:54 +00:00
Remove bogus std::error_code returns form SectionRef.
There are two methods in SectionRef that can fail: * getName: The index into the string table can be invalid. * getContents: The section might point to invalid contents. Every other method will always succeed and returning and std::error_code just complicates the code. For example, a section can have an invalid alignment, but if we are able to get to the section structure at all and create a SectionRef, we will always be able to read that invalid alignment. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@219314 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -67,11 +67,10 @@ int convert_for_testing_main(int argc, const char **argv) {
|
||||
return 1;
|
||||
|
||||
// Get the contents of the given sections.
|
||||
uint64_t ProfileNamesAddress = ProfileNames.getAddress();
|
||||
StringRef CoverageMappingData;
|
||||
uint64_t ProfileNamesAddress;
|
||||
StringRef ProfileNamesData;
|
||||
if (CoverageMapping.getContents(CoverageMappingData) ||
|
||||
ProfileNames.getAddress(ProfileNamesAddress) ||
|
||||
ProfileNames.getContents(ProfileNamesData))
|
||||
return 1;
|
||||
|
||||
|
Reference in New Issue
Block a user