]> granicus.if.org Git - llvm/commitdiff
WasmEmitter - Don't dereference a dyn_cast result. NFCI.
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Tue, 17 Sep 2019 19:14:11 +0000 (19:14 +0000)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Tue, 17 Sep 2019 19:14:11 +0000 (19:14 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372165 91177308-0d34-0410-b5e6-96231b3b80d8

lib/ObjectYAML/WasmEmitter.cpp

index e374764bf13962b21e276a41fa5760472c8a58ab..42c57d42ad786085da50f35e9fa037bad06d9b94 100644 (file)
@@ -518,7 +518,7 @@ void WasmWriter::writeRelocSection(raw_ostream &OS, WasmYAML::Section &Sec,
     writeStringRef("reloc.DATA", OS);
     break;
   case wasm::WASM_SEC_CUSTOM: {
-    auto CustomSection = dyn_cast<WasmYAML::CustomSection>(&Sec);
+    auto *CustomSection = cast<WasmYAML::CustomSection>(&Sec);
     writeStringRef(("reloc." + CustomSection->Name).str(), OS);
     break;
   }