summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-cov
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2014-10-08 15:28:58 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2014-10-08 15:28:58 +0000
commit802912743ef73ea794cb3c66a8cb2211735a12c3 (patch)
tree783b34f5407b2fb86acbd48216621d09c45d41dc /llvm/tools/llvm-cov
parent14fc1c0240930563b8692e8c29c76c9a7fbde32d (diff)
downloadbcm5719-llvm-802912743ef73ea794cb3c66a8cb2211735a12c3.tar.gz
bcm5719-llvm-802912743ef73ea794cb3c66a8cb2211735a12c3.zip
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. llvm-svn: 219314
Diffstat (limited to 'llvm/tools/llvm-cov')
-rw-r--r--llvm/tools/llvm-cov/TestingSupport.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/llvm/tools/llvm-cov/TestingSupport.cpp b/llvm/tools/llvm-cov/TestingSupport.cpp
index 8f580cf64f8..96417645f65 100644
--- a/llvm/tools/llvm-cov/TestingSupport.cpp
+++ b/llvm/tools/llvm-cov/TestingSupport.cpp
@@ -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;
OpenPOWER on IntegriCloud