diff options
author | Fangrui Song <maskray@google.com> | 2019-05-10 10:19:08 +0000 |
---|---|---|
committer | Fangrui Song <maskray@google.com> | 2019-05-10 10:19:08 +0000 |
commit | 93b6aa07519753beab6e7410700e4d0c569d5890 (patch) | |
tree | c137e8b94f68e167fed4af7d0588c445a9f2c138 /llvm/lib/Object/ELFObjectFile.cpp | |
parent | a2b780b731969f63e2e9e9ea76e43cf86d47a5d3 (diff) | |
download | bcm5719-llvm-93b6aa07519753beab6e7410700e4d0c569d5890.tar.gz bcm5719-llvm-93b6aa07519753beab6e7410700e4d0c569d5890.zip |
[Object] Move ELF specific ObjectFile::getBuildAttributes to ELFObjectFileBase
Change the return type from std::error_code to Error and make the
function protected.
llvm-svn: 360416
Diffstat (limited to 'llvm/lib/Object/ELFObjectFile.cpp')
-rw-r--r-- | llvm/lib/Object/ELFObjectFile.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/llvm/lib/Object/ELFObjectFile.cpp b/llvm/lib/Object/ELFObjectFile.cpp index 07851411fe6..cc1eeefec26 100644 --- a/llvm/lib/Object/ELFObjectFile.cpp +++ b/llvm/lib/Object/ELFObjectFile.cpp @@ -148,8 +148,7 @@ SubtargetFeatures ELFObjectFileBase::getMIPSFeatures() const { SubtargetFeatures ELFObjectFileBase::getARMFeatures() const { SubtargetFeatures Features; ARMAttributeParser Attributes; - std::error_code EC = getBuildAttributes(Attributes); - if (EC) + if (Error E = getBuildAttributes(Attributes)) return SubtargetFeatures(); // both ARMv7-M and R have to support thumb hardware div @@ -279,8 +278,7 @@ void ELFObjectFileBase::setARMSubArch(Triple &TheTriple) const { return; ARMAttributeParser Attributes; - std::error_code EC = getBuildAttributes(Attributes); - if (EC) + if (Error E = getBuildAttributes(Attributes)) return; std::string Triple; |