Fix typoed cast to avoid assertion in MCFragment::dump.
authorNirav Dave <niravd@google.com>
Mon, 18 Jun 2018 16:26:11 +0000 (16:26 +0000)
committerNirav Dave <niravd@google.com>
Mon, 18 Jun 2018 16:26:11 +0000 (16:26 +0000)
llvm-svn: 334959

llvm/lib/MC/MCFragment.cpp

index 01ad640..0ebcf21 100644 (file)
@@ -334,7 +334,7 @@ LLVM_DUMP_METHOD void MCFragment::dump() const {
 
   OS << "<MCFragment " << (const void *)this << " LayoutOrder:" << LayoutOrder
      << " Offset:" << Offset << " HasInstructions:" << hasInstructions();
-  if (const MCEncodedFragment *EF = cast<MCEncodedFragment>(this))
+  if (const MCEncodedFragment *EF = dyn_cast<MCEncodedFragment>(this))
     OS << " BundlePadding:" << static_cast<unsigned>(EF->getBundlePadding());
   OS << ">";