[PATCH] D23443: (Trivial) TargetPassConfig: assert when TargetMachine has no MCAsmInfo

Alex Bradbury via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 18 06:16:57 PDT 2016


This revision was automatically updated to reflect the committed changes.
Closed by commit rL279061: (Trivial) TargetPassConfig: assert when TargetMachine has no MCAsmInfo (authored by asb).

Changed prior to commit:
  https://reviews.llvm.org/D23443?vs=67813&id=68527#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D23443

Files:
  llvm/trunk/lib/CodeGen/TargetPassConfig.cpp

Index: llvm/trunk/lib/CodeGen/TargetPassConfig.cpp
===================================================================
--- llvm/trunk/lib/CodeGen/TargetPassConfig.cpp
+++ llvm/trunk/lib/CodeGen/TargetPassConfig.cpp
@@ -474,7 +474,9 @@
 /// Turn exception handling constructs into something the code generators can
 /// handle.
 void TargetPassConfig::addPassesToHandleExceptions() {
-  switch (TM->getMCAsmInfo()->getExceptionHandlingType()) {
+  const MCAsmInfo *MCAI = TM->getMCAsmInfo();
+  assert(MCAI && "No MCAsmInfo");
+  switch (MCAI->getExceptionHandlingType()) {
   case ExceptionHandling::SjLj:
     // SjLj piggy-backs on dwarf for this bit. The cleanups done apply to both
     // Dwarf EH prepare needs to be run after SjLj prepare. Otherwise,


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D23443.68527.patch
Type: text/x-patch
Size: 758 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160818/0a974358/attachment.bin>


More information about the llvm-commits mailing list