]> granicus.if.org Git - llvm/commitdiff
[lib/ObjectYAML] - Fix BB after r353607 [2]. NFC.
authorGeorge Rimar <grimar@accesssoftek.com>
Sat, 9 Feb 2019 12:14:20 +0000 (12:14 +0000)
committerGeorge Rimar <grimar@accesssoftek.com>
Sat, 9 Feb 2019 12:14:20 +0000 (12:14 +0000)
The second and the last place it seems.

Error was:
[  4%] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/Error.cpp.o
/Users/buildslave/as-bldslv9_new/lld-x86_64-darwin13/llvm.src/lib/ObjectYAML/ELFYAML.cpp:993:15: error: unused variable 'Object' [-Werror,-Wunused-variable]
  const auto *Object = static_cast<ELFYAML::Object *>(IO.getContext());

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

lib/ObjectYAML/ELFYAML.cpp

index 1a2e1835c360a9e05643d3ec420a733e598d47d4..339f080337ae3db21dcb4385fb1455169ded2bdb 100644 (file)
@@ -990,8 +990,7 @@ struct NormalizedMips64RelType {
 
 void MappingTraits<ELFYAML::DynamicEntry>::mapping(IO &IO,
                                                    ELFYAML::DynamicEntry &Rel) {
-  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");
 
   IO.mapRequired("Tag", Rel.Tag);
   IO.mapRequired("Value", Rel.Val);