summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGeorge Rimar <grimar@accesssoftek.com>2019-02-19 14:22:10 +0000
committerGeorge Rimar <grimar@accesssoftek.com>2019-02-19 14:22:10 +0000
commit12b283dfa6a5306320de9d304c8fd73c91483c17 (patch)
tree1c0a8fadba91bc15c5c78615ee9b2e83c129efba
parentc09f2cd0cbe4b356704de0f903880dd4e2e9c843 (diff)
downloadbcm5719-llvm-12b283dfa6a5306320de9d304c8fd73c91483c17.tar.gz
bcm5719-llvm-12b283dfa6a5306320de9d304c8fd73c91483c17.zip
Fix BB after r354328.
Bot: http://lab.llvm.org:8011/builders/lld-x86_64-darwin13/builds/30188/steps/build_Lld/logs/stdio Error: /Users/buildslave/as-bldslv9_new/lld-x86_64-darwin13/llvm.src/lib/ObjectYAML/ELFYAML.cpp:1013:15: error: unused variable 'Object' [-Werror,-Wunused-variable] const auto *Object = static_cast<ELFYAML::Object *>(IO.getContext()); ^ /Users/buildslave/as-bldslv9_new/lld-x86_64-darwin13/llvm.src/lib/ObjectYAML/ELFYAML.cpp:1023:15: error: unused variable 'Object' [-Werror,-Wunused-variable] const auto *Object = static_cast<ELFYAML::Object *>(IO.getContext()); Fix: change const auto *Object = static_cast<ELFYAML::Object *>(IO.getContext()); assert(Object && "The IO context is not initialized"); to assert(!IO.getContext() && "The IO context is initialized already"); llvm-svn: 354329
-rw-r--r--llvm/lib/ObjectYAML/ELFYAML.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/llvm/lib/ObjectYAML/ELFYAML.cpp b/llvm/lib/ObjectYAML/ELFYAML.cpp
index bc73eb9d568..13c0bfdbaeb 100644
--- a/llvm/lib/ObjectYAML/ELFYAML.cpp
+++ b/llvm/lib/ObjectYAML/ELFYAML.cpp
@@ -1010,8 +1010,7 @@ void MappingTraits<ELFYAML::DynamicEntry>::mapping(IO &IO,
void MappingTraits<ELFYAML::VerneedEntry>::mapping(IO &IO,
ELFYAML::VerneedEntry &E) {
- const auto *Object = static_cast<ELFYAML::Object *>(IO.getContext());
- assert(Object && "The IO context is not initialized");
+ assert(!IO.getContext() && "The IO context is initialized already");
IO.mapRequired("Version", E.Version);
IO.mapRequired("File", E.File);
@@ -1020,8 +1019,7 @@ void MappingTraits<ELFYAML::VerneedEntry>::mapping(IO &IO,
void MappingTraits<ELFYAML::VernauxEntry>::mapping(IO &IO,
ELFYAML::VernauxEntry &E) {
- const auto *Object = static_cast<ELFYAML::Object *>(IO.getContext());
- assert(Object && "The IO context is not initialized");
+ assert(!IO.getContext() && "The IO context is initialized already");
IO.mapRequired("Name", E.Name);
IO.mapRequired("Hash", E.Hash);
OpenPOWER on IntegriCloud