[Lldb-commits] [PATCH] D65122: [Symbol] Use llvm::Expected when getting TypeSystems
Jonas Devlieghere via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Mon Jul 29 12:58:57 PDT 2019
JDevlieghere added inline comments.
================
Comment at: source/API/SBModule.cpp:525
module_sp->GetTypeSystemForLanguage(eLanguageTypeC);
- if (type_system) {
- CompilerType compiler_type = type_system->GetBuiltinTypeByName(name);
+ if (auto err = type_system_or_err.takeError()) {
+ llvm::consumeError(std::move(err));
----------------
Any reason you do this instead of
```if (!type_system_or_err) {
llvm::consumeError(type_system_or_err.takeError());
...
```
================
Comment at: source/API/SBModule.cpp:493
+ llvm::consumeError(std::move(err));
+ } else {
+ return LLDB_RECORD_RESULT(
----------------
No else before return?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D65122/new/
https://reviews.llvm.org/D65122
More information about the lldb-commits
mailing list