[llvm] r353608 - [lib/ObjectYAML] - Fix BB after r353607. NFC.

George Rimar via llvm-commits llvm-commits at lists.llvm.org
Sat Feb 9 04:04:39 PST 2019


Author: grimar
Date: Sat Feb  9 04:04:39 2019
New Revision: 353608

URL: http://llvm.org/viewvc/llvm-project?rev=353608&view=rev
Log:
[lib/ObjectYAML] - Fix BB after r353607. NFC.

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)

Modified:
    llvm/trunk/lib/ObjectYAML/ELFYAML.cpp

Modified: llvm/trunk/lib/ObjectYAML/ELFYAML.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ObjectYAML/ELFYAML.cpp?rev=353608&r1=353607&r2=353608&view=diff
==============================================================================
--- llvm/trunk/lib/ObjectYAML/ELFYAML.cpp (original)
+++ llvm/trunk/lib/ObjectYAML/ELFYAML.cpp Sat Feb  9 04:04:39 2019
@@ -663,8 +663,7 @@ void ScalarEnumerationTraits<ELFYAML::EL
 
 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.




More information about the llvm-commits mailing list