[Lldb-commits] [lldb] 27f2fe9 - Adapt lldb-instr to d47ee525f9e92898 APi change

via lldb-commits lldb-commits at lists.llvm.org
Fri Jan 29 02:06:34 PST 2021


Author: serge-sans-paille
Date: 2021-01-29T10:58:40+01:00
New Revision: 27f2fe9163ec9e96f240fa57b5e2d7c55f54e266

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

LOG: Adapt lldb-instr to d47ee525f9e92898 APi change

Added: 
    

Modified: 
    lldb/tools/lldb-instr/Instrument.cpp

Removed: 
    


################################################################################
diff  --git a/lldb/tools/lldb-instr/Instrument.cpp b/lldb/tools/lldb-instr/Instrument.cpp
index 8ec01304891b..8fbc3e64833c 100644
--- a/lldb/tools/lldb-instr/Instrument.cpp
+++ b/lldb/tools/lldb-instr/Instrument.cpp
@@ -342,9 +342,15 @@ class SBAction : public ASTFrontendAction {
 };
 
 int main(int argc, const char **argv) {
-  CommonOptionsParser OP(argc, argv, InstrCategory,
-                         "Utility for generating the macros for LLDB's "
-                         "instrumentation framework.");
+  auto ExpectedParser = CommonOptionsParser::create(
+      argc, argv, InstrCategory, llvm::cl::OneOrMore,
+      "Utility for generating the macros for LLDB's "
+      "instrumentation framework.");
+  if (!ExpectedParser) {
+    llvm::errs() << ExpectedParser.takeError();
+    return 1;
+  }
+  CommonOptionsParser &OP = ExpectedParser.get();
 
   auto PCHOpts = std::make_shared<PCHContainerOperations>();
   PCHOpts->registerWriter(std::make_unique<ObjectFilePCHContainerWriter>());


        


More information about the lldb-commits mailing list