[Lldb-commits] [PATCH] D100447: [lldb] Silence GCC warnings about control reaching the end of non-void functions. NFC.

Martin Storsjö via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Wed Apr 14 01:23:20 PDT 2021


mstorsjo updated this revision to Diff 337366.
mstorsjo added a comment.

Moved unreachable to outside of switch


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D100447/new/

https://reviews.llvm.org/D100447

Files:
  lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp


Index: lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
===================================================================
--- lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
+++ lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
@@ -1439,7 +1439,8 @@
                                           g_get_dynamic_class_info2_name);
     return m_objc_copyRealizedClassList_helper.utility_function.get();
   }
-  };
+  }
+  llvm_unreachable("Unexpected helper");
 }
 
 lldb::addr_t &
@@ -1450,6 +1451,7 @@
   case objc_copyRealizedClassList:
     return m_objc_copyRealizedClassList_helper.args;
   }
+  llvm_unreachable("Unexpected helper");
 }
 
 AppleObjCRuntimeV2::DynamicClassInfoExtractor::Helper


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D100447.337366.patch
Type: text/x-patch
Size: 794 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20210414/deff7146/attachment.bin>


More information about the lldb-commits mailing list