[Lldb-commits] [PATCH] D134033: [lldb/Plugins] Improve error reporting when reading memory in Scripted Process

2022-11-19 Thread Michał Górny via Phabricator via lldb-commits
mgorny added a comment.

LLDB no longer builds for me after this change (could be related to swig 4.1.0):

  [1/5] Building CXX object 
tools/lldb/source/Plugins/ScriptInterpre...ldbPluginScriptInterpreterPython.dir/ScriptedPythonInterface.cpp.o
  FAILED: 
tools/lldb/source/Plugins/ScriptInterpreter/Python/CMakeFiles/lldbPluginScriptInterpreterPython.dir/ScriptedPythonInterface.cpp.o
 
  CCACHE_CPP2=yes CCACHE_HASHDIR=yes /usr/bin/ccache /usr/bin/c++ 
-DGTEST_HAS_RTTI=0 -DHAVE_ROUND 
-DLLDB_PYTHON_EXE_RELATIVE_PATH=\"bin/python3.10\" 
-DLLDB_PYTHON_RELATIVE_LIBDIR=\"lib/python3.10/site-packages\" -D_DEBUG 
-D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS 
-D__STDC_LIMIT_MACROS 
-I/home/mgorny/git/llvm-project/build/tools/lldb/source/Plugins/ScriptInterpreter/Python
 -I/home/mgorny/git/llvm-project/lldb/source/Plugins/ScriptInterpreter/Python 
-I/home/mgorny/git/llvm-project/lldb/include 
-I/home/mgorny/git/llvm-project/build/tools/lldb/include 
-I/home/mgorny/git/llvm-project/build/include 
-I/home/mgorny/git/llvm-project/llvm/include -I/usr/include/python3.10 
-I/home/mgorny/git/llvm-project/llvm/../clang/include 
-I/home/mgorny/git/llvm-project/build/tools/lldb/../clang/include 
-I/home/mgorny/git/llvm-project/lldb/source 
-I/home/mgorny/git/llvm-project/build/tools/lldb/source -isystem 
/usr/include/libxml2 -fPIC -fno-semantic-interposition 
-fvisibility-inlines-hidden -Werror=date-time -Wall -Wextra 
-Wno-unused-parameter -Wwrite-strings -Wcast-qual 
-Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough 
-Wno-maybe-uninitialized -Wno-class-memaccess -Wno-redundant-move 
-Wno-pessimizing-move -Wno-noexcept-type -Wdelete-non-virtual-dtor 
-Wsuggest-override -Wno-comment -Wno-misleading-indentation 
-Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections 
-fdata-sections -Wno-deprecated-declarations -Wno-unknown-pragmas 
-Wno-strict-aliasing -Wno-stringop-truncation -Os -DNDEBUG  -fno-exceptions 
-fno-rtti -UNDEBUG -std=c++17 -MD -MT 
tools/lldb/source/Plugins/ScriptInterpreter/Python/CMakeFiles/lldbPluginScriptInterpreterPython.dir/ScriptedPythonInterface.cpp.o
 -MF 
tools/lldb/source/Plugins/ScriptInterpreter/Python/CMakeFiles/lldbPluginScriptInterpreterPython.dir/ScriptedPythonInterface.cpp.o.d
 -o 
tools/lldb/source/Plugins/ScriptInterpreter/Python/CMakeFiles/lldbPluginScriptInterpreterPython.dir/ScriptedPythonInterface.cpp.o
 -c 
/home/mgorny/git/llvm-project/lldb/source/Plugins/ScriptInterpreter/Python/ScriptedPythonInterface.cpp
  In file included from 
/home/mgorny/git/llvm-project/lldb/source/Plugins/ScriptInterpreter/Python/ScriptedPythonInterface.cpp:20:
  
/home/mgorny/git/llvm-project/lldb/source/Plugins/ScriptInterpreter/Python/ScriptedPythonInterface.h:113:13:
 error: explicit specialization in non-namespace scope ‘class 
lldb_private::ScriptedPythonInterface’
113 |   template <> struct transformation {
| ^
  
/home/mgorny/git/llvm-project/lldb/source/Plugins/ScriptInterpreter/Python/ScriptedPythonInterface.h:113:22:
 error: too few template-parameter-lists
113 |   template <> struct transformation {
|  ^~
  
/home/mgorny/git/llvm-project/lldb/source/Plugins/ScriptInterpreter/Python/ScriptedPythonInterface.h:129:13:
 error: explicit specialization in non-namespace scope ‘class 
lldb_private::ScriptedPythonInterface’
129 |   template <> typename transformation::type Transform(Status 
arg) {
| ^
  
/home/mgorny/git/llvm-project/lldb/source/Plugins/ScriptInterpreter/Python/ScriptedPythonInterface.h:
 In member function 
‘lldb_private::ScriptedPythonInterface::transformation::type
 lldb_private::ScriptedPythonInterface::Transform(lldb_private::Status)’:
  
/home/mgorny/git/llvm-project/lldb/source/Plugins/ScriptInterpreter/Python/ScriptedPythonInterface.h:131:33:
 error: could not convert ‘lldb_private::python::ToSWIGWrapper(const 
lldb_private::Status&)()’ from ‘lldb_private::python::PythonObject’ to 
‘lldb_private::ScriptedPythonInterface::transformation::type’
 {aka ‘lldb_private::Status’}
131 | return python::ToSWIGWrapper(arg);
|~^
| |
| lldb_private::python::PythonObject
  In file included from 
/home/mgorny/git/llvm-project/lldb/source/Plugins/ScriptInterpreter/Python/ScriptedPythonInterface.cpp:16:
  
/home/mgorny/git/llvm-project/lldb/source/Plugins/ScriptInterpreter/Python/lldb-python.h:
 At global scope:
  
/home/mgorny/git/llvm-project/lldb/source/Plugins/ScriptInterpreter/Python/lldb-python.h:16:30:
 warning: ‘g_fcxx_modules_workaround’ defined but not used [-Wunused-variable]
 16 | static llvm::Expected *g_fcxx_modules_workaround;
|  ^
  [2/5] Building CXX object 
tools/lldb/source/Plugins/ScriptInterpre...ginScriptInterpreterPython.dir/Script

[Lldb-commits] [PATCH] D134033: [lldb/Plugins] Improve error reporting when reading memory in Scripted Process

2022-11-19 Thread Douglas Yung via Phabricator via lldb-commits
dyung added a comment.

This seems to have broken the cross-project-test buildbot as well: 
https://lab.llvm.org/buildbot/#/builders/217/builds/15302


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D134033

___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D134033: [lldb/Plugins] Improve error reporting when reading memory in Scripted Process

2022-11-19 Thread Med Ismail Bennani via Phabricator via lldb-commits
mib added a comment.

@mgorny @dyung `error: too few template-parameter-lists` this seems to be a 
`g++` error. Could you try building with clang to confirm my theory ? I'll try 
to fix the issue but I have no way to reproduce it


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D134033

___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D134033: [lldb/Plugins] Improve error reporting when reading memory in Scripted Process

2022-11-19 Thread Michał Górny via Phabricator via lldb-commits
mgorny added a comment.

In D134033#3939158 , @mib wrote:

> @mgorny @dyung `error: too few template-parameter-lists` this seems to be a 
> `g++` error. Could you try building with clang to confirm my theory ? I'll 
> try to fix the issue but I have no way to reproduce it

I'm going to try. Can we revert the change in the meantime?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D134033

___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D134033: [lldb/Plugins] Improve error reporting when reading memory in Scripted Process

2022-11-19 Thread Med Ismail Bennani via Phabricator via lldb-commits
mib added a comment.

In D134033#3939186 , @mgorny wrote:

> In D134033#3939158 , @mib wrote:
>
>> @mgorny @dyung `error: too few template-parameter-lists` this seems to be a 
>> `g++` error. Could you try building with clang to confirm my theory ? I'll 
>> try to fix the issue but I have no way to reproduce it
>
> I'm going to try. Can we revert the change in the meantime?

I was able to get my hands on a linux box, if I can reproduce the build failure 
I'll try to fix it otherwise I'll revert my patches.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D134033

___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D138250: [lldb/Python] Unify PythonFormat & GetPythonValueFormatString (NFC)

2022-11-19 Thread Med Ismail Bennani via Phabricator via lldb-commits
mib closed this revision.
mib added a comment.

Landed in 27a26e7ab7d8a8b47c63f68bd1801fc2f9342637 



Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D138250

___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D134033: [lldb/Plugins] Improve error reporting when reading memory in Scripted Process

2022-11-19 Thread Michał Górny via Phabricator via lldb-commits
mgorny added a comment.

I can confirm that it doesn't fail with clang.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D134033

___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D134033: [lldb/Plugins] Improve error reporting when reading memory in Scripted Process

2022-11-19 Thread Med Ismail Bennani via Phabricator via lldb-commits
mib added a comment.

In D134033#3939219 , @mgorny wrote:

> I can confirm that it doesn't fail with clang.

I think I have a fix!


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D134033

___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] 41f3e6b - [lldb/Plugins] Fix build failure with GCC in ScriptedPythonInterface::Dispatch

2022-11-19 Thread Med Ismail Bennani via lldb-commits

Author: Med Ismail Bennani
Date: 2022-11-19T13:24:47-08:00
New Revision: 41f3e6b74df173198c67f46f223b9815334d42a2

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

LOG: [lldb/Plugins] Fix build failure with GCC in 
ScriptedPythonInterface::Dispatch

This patch should fix the build failures following 7e01924 when building
with GCC. These failures were mostly caused by GCC's poor support of C++
templates (namely, partial template specialization).

To work around that problem, this patch makes use of overloading and get
rid of the templated structs and specialized structs.

Signed-off-by: Med Ismail Bennani 

Added: 


Modified: 
lldb/source/Plugins/ScriptInterpreter/Python/ScriptedPythonInterface.h

Removed: 




diff  --git 
a/lldb/source/Plugins/ScriptInterpreter/Python/ScriptedPythonInterface.h 
b/lldb/source/Plugins/ScriptInterpreter/Python/ScriptedPythonInterface.h
index ac1fe0955c370..268430f288f28 100644
--- a/lldb/source/Plugins/ScriptInterpreter/Python/ScriptedPythonInterface.h
+++ b/lldb/source/Plugins/ScriptInterpreter/Python/ScriptedPythonInterface.h
@@ -101,36 +101,27 @@ class ScriptedPythonInterface : virtual public 
ScriptedInterface {
 
   Status GetStatusFromMethod(llvm::StringRef method_name);
 
-  template  struct transformation { using type = T; };
-  template  struct reverse_transformation {
-static void Apply(ScriptedPythonInterface &obj, T &original_arg,
-  U transformed_arg, Status &error) {
-  // If U is not a PythonObject, don't touch it!
-  return;
-}
-  };
-
-  template <> struct transformation {
-using type = python::PythonObject;
-  };
-  template  struct reverse_transformation 
{
-static void Apply(ScriptedPythonInterface &obj, T &original_arg,
-  python::PythonObject transformed_arg, Status &error) {
-  original_arg =
-  obj.ExtractValueFromPythonObject(transformed_arg, error);
-}
-  };
-
-  template  typename transformation::type Transform(T object) {
+  template  T Transform(T object) {
 // No Transformation for generic usage
 return {object};
   }
 
-  template <> typename transformation::type Transform(Status arg) {
-// Call SWIG Wrapper function
+  python::PythonObject Transform(Status arg) {
 return python::ToSWIGWrapper(arg);
   }
 
+  template 
+  void ReverseTransform(T &original_arg, U transformed_arg, Status &error) {
+// If U is not a PythonObject, don't touch it!
+return;
+  }
+
+  template 
+  void ReverseTransform(T &original_arg, python::PythonObject transformed_arg,
+Status &error) {
+original_arg = ExtractValueFromPythonObject(transformed_arg, error);
+  }
+
   template 
   auto TransformTuple(const std::tuple &args,
   std::index_sequence) {
@@ -146,8 +137,7 @@ class ScriptedPythonInterface : virtual public 
ScriptedInterface {
 
   template 
   void TransformBack(T &original_arg, U transformed_arg, Status &error) {
-reverse_transformation::Apply(*this, original_arg, transformed_arg,
-error);
+ReverseTransform(original_arg, transformed_arg, error);
   }
 
   template 



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D134033: [lldb/Plugins] Improve error reporting when reading memory in Scripted Process

2022-11-19 Thread Med Ismail Bennani via Phabricator via lldb-commits
mib added a comment.

@mgorny @dyung 41f3e6b74df1 
 should 
fix this


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D134033

___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D137217: [LTO][COFF] Use bitcode file names in lto native object file names.

2022-11-19 Thread Fangrui Song via Phabricator via lldb-commits
MaskRay added inline comments.



Comment at: clang/tools/clang-linker-wrapper/ClangLinkerWrapper.cpp:846
+  auto AddStream = [&](size_t Task,
+   Twine ModuleName) -> std::unique_ptr {
 int FD = -1;

`Twine` should only be used as const references as arguments.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D137217

___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D138276: TableGen: require tablegen cl::opts to be registered explicitly

2022-11-19 Thread Fangrui Song via Phabricator via lldb-commits
MaskRay accepted this revision.
MaskRay added a comment.
This revision is now accepted and ready to land.
Herald added a subscriber: StephenFan.

This is similar to `mlir::register*Options` and looks good to me.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D138276

___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D138376: Use None consistently (NFC)

2022-11-19 Thread Kazu Hirata via Phabricator via lldb-commits
kazu created this revision.
Herald added subscribers: Moerafaat, zero9178, mtrofin, bzcheeseman, ayermolo, 
sdasgup3, wenzhicui, wrengr, cota, teijeong, rdzhabarov, tatianashp, msifontes, 
jurahul, Kayjukh, grosul1, Joonsoo, liufengdb, aartbik, mgester, arpith-jacob, 
antiagainst, shauheen, rriddle, mehdi_amini, pengfei, hiraditya.
Herald added a reviewer: rafauler.
Herald added a reviewer: Amir.
Herald added a reviewer: maksfb.
Herald added a project: All.
kazu requested review of this revision.
Herald added subscribers: llvm-commits, lldb-commits, cfe-commits, yota9, 
stephenneuendorffer, nicolasvasilache, MaskRay.
Herald added a reviewer: nicolasvasilache.
Herald added projects: clang, LLDB, MLIR, LLVM.

This patch replaces NoneType() and NoneType::None with None in
preparation for migration from llvm::Optional to std::optional.

In the std::optional world, we are not guranteed to be able to
default-construct std::nullopt_t or peek what's inside it, so neither
NoneType() nor NoneType::None has a corresponding expression in the
std::optional world.

Once we consistently use None, we should even be able to replace the
contents of llvm/include/llvm/ADT/None.h with something like:

  using NoneType = std::nullopt_t;
  inline constexpr std::nullopt_t None = std::nullopt;

to ease the migration from llvm::Optional to std::optional.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D138376

Files:
  bolt/include/bolt/Core/BinaryContext.h
  bolt/include/bolt/Core/BinaryFunction.h
  bolt/include/bolt/Core/MCPlusBuilder.h
  bolt/lib/Core/BinaryContext.cpp
  bolt/lib/Core/MCPlusBuilder.cpp
  bolt/lib/Profile/BoltAddressTranslation.cpp
  bolt/lib/Profile/DataAggregator.cpp
  bolt/lib/Profile/DataReader.cpp
  bolt/lib/Rewrite/RewriteInstance.cpp
  bolt/lib/Target/X86/X86MCPlusBuilder.cpp
  bolt/lib/Utils/Utils.cpp
  clang/lib/Driver/ToolChains/HLSL.cpp
  lldb/source/Plugins/ExpressionParser/Clang/CppModuleConfiguration.cpp
  llvm/include/llvm/Analysis/InlineAdvisor.h
  llvm/include/llvm/Analysis/ObjCARCAnalysisUtils.h
  llvm/include/llvm/IR/DebugInfoMetadata.h
  llvm/lib/CodeGen/RemoveRedundantDebugValues.cpp
  llvm/lib/Transforms/Utils/BasicBlockUtils.cpp
  llvm/unittests/DebugInfo/DWARF/DWARFExpressionCopyBytesTest.cpp
  llvm/unittests/IR/MetadataTest.cpp
  mlir/lib/Dialect/OpenMP/IR/OpenMPDialect.cpp

Index: mlir/lib/Dialect/OpenMP/IR/OpenMPDialect.cpp
===
--- mlir/lib/Dialect/OpenMP/IR/OpenMPDialect.cpp
+++ mlir/lib/Dialect/OpenMP/IR/OpenMPDialect.cpp
@@ -312,12 +312,12 @@
   if (parser.parseOperand(*chunkSize) || parser.parseColonType(chunkType))
 return failure();
 } else {
-  chunkSize = llvm::NoneType::None;
+  chunkSize = llvm::None;
 }
 break;
   case ClauseScheduleKind::Auto:
   case ClauseScheduleKind::Runtime:
-chunkSize = llvm::NoneType::None;
+chunkSize = llvm::None;
   }
 
   // If there is a comma, we have one or more modifiers..
Index: llvm/unittests/IR/MetadataTest.cpp
===
--- llvm/unittests/IR/MetadataTest.cpp
+++ llvm/unittests/IR/MetadataTest.cpp
@@ -3683,9 +3683,9 @@
   DILocalVariable *VarB =
   DILocalVariable::get(Context, Scope, "B", File, 7, Type, 3, Flags, 8, nullptr);
 
-  DebugVariable DebugVariableA(VarA, NoneType(), nullptr);
-  DebugVariable DebugVariableInlineA(VarA, NoneType(), InlinedLoc);
-  DebugVariable DebugVariableB(VarB, NoneType(), nullptr);
+  DebugVariable DebugVariableA(VarA, None, nullptr);
+  DebugVariable DebugVariableInlineA(VarA, None, InlinedLoc);
+  DebugVariable DebugVariableB(VarB, None, nullptr);
   DebugVariable DebugVariableFragB(VarB, {{16, 16}}, nullptr);
 
   DebugVariableMap.insert({DebugVariableA, 2});
Index: llvm/unittests/DebugInfo/DWARF/DWARFExpressionCopyBytesTest.cpp
===
--- llvm/unittests/DebugInfo/DWARF/DWARFExpressionCopyBytesTest.cpp
+++ llvm/unittests/DebugInfo/DWARF/DWARFExpressionCopyBytesTest.cpp
@@ -159,7 +159,7 @@
 return Instr;
   }
 }
-return NoneType();
+return None;
   };
 
   std::unique_ptr Ctx = DWARFContext::create(E);
Index: llvm/lib/Transforms/Utils/BasicBlockUtils.cpp
===
--- llvm/lib/Transforms/Utils/BasicBlockUtils.cpp
+++ llvm/lib/Transforms/Utils/BasicBlockUtils.cpp
@@ -428,8 +428,7 @@
   VariableMap;
   for (auto &I : *BB) {
 if (DbgValueInst *DVI = dyn_cast(&I)) {
-  DebugVariable Key(DVI->getVariable(),
-NoneType(),
+  DebugVariable Key(DVI->getVariable(), None,
 DVI->getDebugLoc()->getInlinedAt());
   auto VMI = VariableMap.find(Key);
   auto *DAI = dyn_cast(DVI);
@@ -490,7 +489,7 @@
   DenseSet SeenDefForAggregate;
   // Returns the DebugVariable for DVI with no fragment info.
   auto GetAggregateVariable = [](DbgV

[Lldb-commits] [lldb] c903136 - [lldb] Use Optional::has_value instead of Optional::hasValue (NFC)

2022-11-19 Thread Kazu Hirata via lldb-commits

Author: Kazu Hirata
Date: 2022-11-19T23:22:48-08:00
New Revision: c903136f195b65f175797eaf856213b1a6826fa2

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

LOG: [lldb] Use Optional::has_value instead of Optional::hasValue (NFC)

Added: 


Modified: 
lldb/source/Plugins/Trace/intel-pt/ThreadDecoder.cpp
lldb/source/Plugins/Trace/intel-pt/TraceIntelPTBundleLoader.cpp

Removed: 




diff  --git a/lldb/source/Plugins/Trace/intel-pt/ThreadDecoder.cpp 
b/lldb/source/Plugins/Trace/intel-pt/ThreadDecoder.cpp
index 21b1aacfccc62..0a819916fc75b 100644
--- a/lldb/source/Plugins/Trace/intel-pt/ThreadDecoder.cpp
+++ b/lldb/source/Plugins/Trace/intel-pt/ThreadDecoder.cpp
@@ -36,7 +36,7 @@ Expected> ThreadDecoder::FindLowestTSC() {
 }
 
 Expected ThreadDecoder::Decode() {
-  if (!m_decoded_thread.hasValue()) {
+  if (!m_decoded_thread.has_value()) {
 if (Expected decoded_thread = DoDecode()) {
   m_decoded_thread = *decoded_thread;
 } else {

diff  --git a/lldb/source/Plugins/Trace/intel-pt/TraceIntelPTBundleLoader.cpp 
b/lldb/source/Plugins/Trace/intel-pt/TraceIntelPTBundleLoader.cpp
index 0e664fd91d80f..c30d6adf3e0f5 100644
--- a/lldb/source/Plugins/Trace/intel-pt/TraceIntelPTBundleLoader.cpp
+++ b/lldb/source/Plugins/Trace/intel-pt/TraceIntelPTBundleLoader.cpp
@@ -34,14 +34,14 @@ Error TraceIntelPTBundleLoader::ParseModule(Target &target,
   auto do_parse = [&]() -> Error {
 FileSpec system_file_spec(module.system_path);
 
-FileSpec local_file_spec(module.file.hasValue() ? *module.file
-: module.system_path);
+FileSpec local_file_spec(module.file.has_value() ? *module.file
+ : module.system_path);
 
 ModuleSpec module_spec;
 module_spec.GetFileSpec() = local_file_spec;
 module_spec.GetPlatformFileSpec() = system_file_spec;
 
-if (module.uuid.hasValue())
+if (module.uuid.has_value())
   module_spec.GetUUID().SetFromStringRef(*module.uuid);
 
 Status error;



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D138376: Use None consistently (NFC)

2022-11-19 Thread Fangrui Song via Phabricator via lldb-commits
MaskRay accepted this revision.
MaskRay added a comment.
This revision is now accepted and ready to land.

LGTM. `enum class NoneType { None = 1 };` is from 
0cd22f9540c0591132ec991c51103cf800cf4e24 (2017) for MSVC workaround. I assume 
it is no longer needed..


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D138376

___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits