]> granicus.if.org Git - llvm/commitdiff
[lib/ObjectYAML] - Fix BB after r353607. NFC.
authorGeorge Rimar <grimar@accesssoftek.com>
Sat, 9 Feb 2019 12:04:39 +0000 (12:04 +0000)
committerGeorge Rimar <grimar@accesssoftek.com>
Sat, 9 Feb 2019 12:04:39 +0000 (12:04 +0000)
Error was:
[  4%] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/DAGDeltaAlgorithm.cpp.o
/Users/buildslave/as-bldslv9_new/lld-x86_64-darwin13/llvm.src/lib/ObjectYAML/ELFYAML.cpp:666:15: error: unused variable 'Object' [-Werror,-Wunused-variable]
  const auto *Object = static_cast<ELFYAML::Object *>(IO.getContext());
(http://lab.llvm.org:8011/builders/lld-x86_64-darwin13/builds/29920)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353608 91177308-0d34-0410-b5e6-96231b3b80d8

lib/ObjectYAML/ELFYAML.cpp

index 4707a44fbd33cf037c81b7eb519d1ce5ebe48905..1a2e1835c360a9e05643d3ec420a733e598d47d4 100644 (file)
@@ -663,8 +663,7 @@ void ScalarEnumerationTraits<ELFYAML::ELF_REL>::enumeration(
 
 void ScalarEnumerationTraits<ELFYAML::ELF_DYNTAG>::enumeration(
     IO &IO, ELFYAML::ELF_DYNTAG &Value) {
-  const auto *Object = static_cast<ELFYAML::Object *>(IO.getContext());
-  assert(Object && "The IO context is not initialized");
+  assert(IO.getContext() && "The IO context is not initialized");
 
 // TODO: For simplicity we do not handle target specific flags. They are
 // still supported and will be shown as a raw numeric values in the output.