[llvm] r372165 - WasmEmitter - Don't dereference a dyn_cast result. NFCI.

Simon Pilgrim via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 17 12:14:11 PDT 2019


Author: rksimon
Date: Tue Sep 17 12:14:11 2019
New Revision: 372165

URL: http://llvm.org/viewvc/llvm-project?rev=372165&view=rev
Log:
WasmEmitter - Don't dereference a dyn_cast result. NFCI.

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

Modified: llvm/trunk/lib/ObjectYAML/WasmEmitter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ObjectYAML/WasmEmitter.cpp?rev=372165&r1=372164&r2=372165&view=diff
==============================================================================
--- llvm/trunk/lib/ObjectYAML/WasmEmitter.cpp (original)
+++ llvm/trunk/lib/ObjectYAML/WasmEmitter.cpp Tue Sep 17 12:14:11 2019
@@ -518,7 +518,7 @@ void WasmWriter::writeRelocSection(raw_o
     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;
   }




More information about the llvm-commits mailing list