[Lldb-commits] [lldb] bafdaa1 - [lldb] Silence warning with latest MSVC on Windows

Alexandre Ganea via lldb-commits lldb-commits at lists.llvm.org
Thu Jan 18 10:06:36 PST 2024


Author: Alexandre Ganea
Date: 2024-01-18T13:06:12-05:00
New Revision: bafdaa171a2806ceff628ed7b64ace2b92c05578

URL: https://github.com/llvm/llvm-project/commit/bafdaa171a2806ceff628ed7b64ace2b92c05578
DIFF: https://github.com/llvm/llvm-project/commit/bafdaa171a2806ceff628ed7b64ace2b92c05578.diff

LOG: [lldb] Silence warning with latest MSVC on Windows

Fixes:
```
[3465/3822] Building CXX object tools\lldb\source\Plugins\SymbolFile\CTF\CMakeFiles\lldbPluginSymbolFileCTF.dir\SymbolFileCTF.cpp.obj
C:\git\llvm-project\lldb\source\Plugins\SymbolFile\CTF\SymbolFileCTF.cpp(606) : warning C4715: 'lldb_private::SymbolFileCTF::CreateType': not all control paths return a value
```

Added: 
    

Modified: 
    lldb/source/Plugins/SymbolFile/CTF/SymbolFileCTF.cpp

Removed: 
    


################################################################################
diff  --git a/lldb/source/Plugins/SymbolFile/CTF/SymbolFileCTF.cpp b/lldb/source/Plugins/SymbolFile/CTF/SymbolFileCTF.cpp
index d192944bb9d0860..65f5b1a5f1b0a2e 100644
--- a/lldb/source/Plugins/SymbolFile/CTF/SymbolFileCTF.cpp
+++ b/lldb/source/Plugins/SymbolFile/CTF/SymbolFileCTF.cpp
@@ -603,6 +603,7 @@ llvm::Expected<TypeSP> SymbolFileCTF::CreateType(CTFType *ctf_type) {
                       ctf_type->uid, ctf_type->name, ctf_type->kind),
         llvm::inconvertibleErrorCode());
   }
+  llvm_unreachable("Unexpected CTF type kind");
 }
 
 llvm::Expected<std::unique_ptr<CTFType>>


        


More information about the lldb-commits mailing list