[Lldb-commits] [clang] [compiler-rt] [libc] [libclc] [libcxxabi] [lld] [lldb] [llvm] [mlir] Add clarifying parenthesis around non-trivial conditions in ternary expressions. (PR #90391)

2024-05-04 Thread Simon Pilgrim via lldb-commits

https://github.com/RKSimon closed 
https://github.com/llvm/llvm-project/pull/90391
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [clang] [compiler-rt] [libc] [libclc] [libcxxabi] [lld] [lldb] [llvm] [mlir] Add clarifying parenthesis around non-trivial conditions in ternary expressions. (PR #90391)

2024-05-03 Thread Simon Pilgrim via lldb-commits

https://github.com/RKSimon approved this pull request.

LGTM

https://github.com/llvm/llvm-project/pull/90391
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [clang] [compiler-rt] [libc] [libclc] [libcxxabi] [lld] [lldb] [llvm] [mlir] llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp:3804: lacking () for c… (PR #90391)

2024-04-28 Thread Simon Pilgrim via lldb-commits

https://github.com/RKSimon commented:

Please address the clang-format warnings the CI has reported

https://github.com/llvm/llvm-project/pull/90391
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [clang] [compiler-rt] [libc] [libclc] [libcxxabi] [lld] [lldb] [llvm] [mlir] llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp:3804: lacking () for c… (PR #90391)

2024-04-28 Thread Simon Pilgrim via lldb-commits

https://github.com/RKSimon commented:

Please update the PR subject as its a lot more than just X86AsmParser.cpp

https://github.com/llvm/llvm-project/pull/90391
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [clang] [compiler-rt] [flang] [libc] [libcxx] [lldb] [llvm] [mlir] [X86] Fast AVX-512-VNNI vpdpwssd tuning (PR #85033)

2024-03-14 Thread Simon Pilgrim via lldb-commits

https://github.com/RKSimon requested changes to this pull request.

This patch needs to be cleanly rebased on trunk (force push is OK in PR branchs)

https://github.com/llvm/llvm-project/pull/85033
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [libcxx] [llvm] [libc] [compiler-rt] [lldb] [clang-tools-extra] [mlir] [clang] [flang] [AArch64] add intrinsic to generate a bfi instruction (PR #79672)

2024-01-29 Thread Simon Pilgrim via lldb-commits

RKSimon wrote:

@RamaMalladiAWS Do you have examples of the IR that fails to lower to BFI? 
These things often turn out to be either a missing middle-end canonicalization 
or maybe a case that could be added to existing pattern matching in the 
back-end.

https://github.com/llvm/llvm-project/pull/79672
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [libcxx] [flang] [libc] [clang-tools-extra] [clang] [llvm] [compiler-rt] [libunwind] [lld] [lldb] [X86] Use RORX over SHR imm (PR #77964)

2024-01-28 Thread Simon Pilgrim via lldb-commits


@@ -4216,6 +4217,95 @@ MachineSDNode *X86DAGToDAGISel::emitPCMPESTR(unsigned 
ROpc, unsigned MOpc,
   return CNode;
 }
 
+// When the consumer of a right shift (arithmetic or logical) wouldn't notice
+// the difference if the instruction was a rotate right instead (because the
+// bits shifted in are truncated away), the shift can be replaced by the RORX
+// instruction from BMI2. This doesn't set flags and can output to a different
+// register. However, this increases code size in most cases, and doesn't leave
+// the high bits in a useful state. There may be other situations where this
+// transformation is profitable given those conditions, but currently the
+// transformation is only made when it likely avoids spilling flags.
+bool X86DAGToDAGISel::rightShiftUnclobberFlags(SDNode *N) {
+  EVT VT = N->getValueType(0);
+
+  // Target has to have BMI2 for RORX
+  if (!Subtarget->hasBMI2())
+return false;
+
+  // Only handle scalar shifts.
+  if (VT.isVector())
+return false;
+
+  unsigned OpSize;
+  if (VT == MVT::i64)
+OpSize = 64;
+  else if (VT == MVT::i32)
+OpSize = 32;
+  else if (VT == MVT::i16)
+OpSize = 16;
+  else if (VT == MVT::i8)
+return false; // i8 shift can't be truncated.
+  else
+llvm_unreachable("Unexpected shift size");
+
+  unsigned TruncateSize = 0;
+  // This only works when the result is truncated.
+  for (const SDNode *User : N->uses()) {
+if (!User->isMachineOpcode() ||
+User->getMachineOpcode() != TargetOpcode::EXTRACT_SUBREG)
+  return false;
+EVT TuncateType = User->getValueType(0);
+if (TuncateType == MVT::i32)
+  TruncateSize = std::max(TruncateSize, 32U);
+else if (TuncateType == MVT::i16)
+  TruncateSize = std::max(TruncateSize, 16U);
+else if (TuncateType == MVT::i8)
+  TruncateSize = std::max(TruncateSize, 8U);
+else
+  return false;
+  }
+  if (TruncateSize >= OpSize)
+return false;
+
+  // The shift must be by an immediate that wouldn't expose the zero or sign
+  // extended result.
+  auto *ShiftAmount = dyn_cast(N->getOperand(1));
+  if (!ShiftAmount || ShiftAmount->getZExtValue() > OpSize - TruncateSize)
+return false;
+
+  // If the shift argument has non-dead EFLAGS, then this shift probably
+  // clobbers those flags making the transformation to RORX useful. This may
+  // have false negatives or positives so ideally this transformation is made
+  // later on.
+  bool ArgProducesFlags = false;
+  SDNode *Input = N->getOperand(0).getNode();
+  for (auto Use : Input->uses()) {
+if (Use->getOpcode() == ISD::CopyToReg) {
+  auto *RegisterNode =
+  dyn_cast(Use->getOperand(1).getNode());

RKSimon wrote:

```dyn_cast(Use->getOperand(1))```

https://github.com/llvm/llvm-project/pull/77964
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [clang-tools-extra] [libcxx] [flang] [lldb] [llvm] [libunwind] [compiler-rt] [lld] [libc] [clang] [X86] Use RORX over SHR imm (PR #77964)

2024-01-25 Thread Simon Pilgrim via lldb-commits


@@ -4216,6 +4217,97 @@ MachineSDNode *X86DAGToDAGISel::emitPCMPESTR(unsigned 
ROpc, unsigned MOpc,
   return CNode;
 }
 
+// When the consumer of a right shift (arithmetic or logical) wouldn't notice
+// the difference if the instruction was a rotate right instead (because the
+// bits shifted in are truncated away), the shift can be replaced by the RORX
+// instruction from BMI2. This doesn't set flags and can output to a different
+// register. However, this increases code size in most cases, and doesn't leave
+// the high bits in a useful state. There may be other situations where this
+// transformation is profitable given those conditions, but currently the
+// transformation is only made when it likely avoids spilling flags.
+bool X86DAGToDAGISel::rightShiftUncloberFlags(SDNode *N) {

RKSimon wrote:

typo: rightShiftUncloberFlags -> rightShiftUnclobberFlags

https://github.com/llvm/llvm-project/pull/77964
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [libc] [lld] [clang-tools-extra] [libcxx] [libunwind] [compiler-rt] [lldb] [flang] [llvm] [clang] [X86] Use RORX over SHR imm (PR #77964)

2024-01-25 Thread Simon Pilgrim via lldb-commits

https://github.com/RKSimon requested changes to this pull request.


https://github.com/llvm/llvm-project/pull/77964
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [libunwind] [clang-tools-extra] [libc] [flang] [lldb] [lld] [compiler-rt] [libcxx] [llvm] [clang] [X86] Use RORX over SHR imm (PR #77964)

2024-01-25 Thread Simon Pilgrim via lldb-commits


@@ -4216,6 +4217,97 @@ MachineSDNode *X86DAGToDAGISel::emitPCMPESTR(unsigned 
ROpc, unsigned MOpc,
   return CNode;
 }
 
+// When the consumer of a right shift (arithmetic or logical) wouldn't notice
+// the difference if the instruction was a rotate right instead (because the
+// bits shifted in are truncated away), the shift can be replaced by the RORX
+// instruction from BMI2. This doesn't set flags and can output to a different
+// register. However, this increases code size in most cases, and doesn't leave
+// the high bits in a useful state. There may be other situations where this
+// transformation is profitable given those conditions, but currently the
+// transformation is only made when it likely avoids spilling flags.
+bool X86DAGToDAGISel::rightShiftUncloberFlags(SDNode *N) {
+  EVT VT = N->getValueType(0);
+
+  // Target has to have BMI2 for RORX
+  if (!Subtarget->hasBMI2())
+return false;
+
+  // Only handle scalar shifts.
+  if (VT.isVector())
+return false;
+
+  unsigned OpSize;
+  if (VT == MVT::i64)
+OpSize = 64;
+  else if (VT == MVT::i32)
+OpSize = 32;
+  else if (VT == MVT::i16)
+OpSize = 16;
+  else if (VT == MVT::i8)
+return false; // i8 shift can't be truncated.
+  else
+llvm_unreachable("Unexpected shift size");
+
+  unsigned TruncateSize = 0;
+  // This only works when the result is truncated.
+  for (const SDNode *User : N->uses()) {
+auto name = User->getOperationName(CurDAG);

RKSimon wrote:

unused variable

https://github.com/llvm/llvm-project/pull/77964
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [clang] [libunwind] [libcxx] [flang] [compiler-rt] [clang-tools-extra] [libc] [lldb] [llvm] [lld] [X86] Use RORX over SHR imm (PR #77964)

2024-01-25 Thread Simon Pilgrim via lldb-commits


@@ -4216,6 +4217,97 @@ MachineSDNode *X86DAGToDAGISel::emitPCMPESTR(unsigned 
ROpc, unsigned MOpc,
   return CNode;
 }
 
+// When the consumer of a right shift (arithmetic or logical) wouldn't notice
+// the difference if the instruction was a rotate right instead (because the
+// bits shifted in are truncated away), the shift can be replaced by the RORX
+// instruction from BMI2. This doesn't set flags and can output to a different
+// register. However, this increases code size in most cases, and doesn't leave
+// the high bits in a useful state. There may be other situations where this
+// transformation is profitable given those conditions, but currently the
+// transformation is only made when it likely avoids spilling flags.
+bool X86DAGToDAGISel::rightShiftUncloberFlags(SDNode *N) {
+  EVT VT = N->getValueType(0);
+
+  // Target has to have BMI2 for RORX
+  if (!Subtarget->hasBMI2())
+return false;
+
+  // Only handle scalar shifts.
+  if (VT.isVector())
+return false;
+
+  unsigned OpSize;
+  if (VT == MVT::i64)
+OpSize = 64;
+  else if (VT == MVT::i32)
+OpSize = 32;
+  else if (VT == MVT::i16)
+OpSize = 16;
+  else if (VT == MVT::i8)
+return false; // i8 shift can't be truncated.
+  else
+llvm_unreachable("Unexpected shift size");
+
+  unsigned TruncateSize = 0;
+  // This only works when the result is truncated.
+  for (const SDNode *User : N->uses()) {
+auto name = User->getOperationName(CurDAG);
+if (!User->isMachineOpcode() ||
+User->getMachineOpcode() != TargetOpcode::EXTRACT_SUBREG)
+  return false;
+EVT TuncateType = User->getValueType(0);
+if (TuncateType == MVT::i32)
+  TruncateSize = std::max(TruncateSize, 32U);
+else if (TuncateType == MVT::i16)
+  TruncateSize = std::max(TruncateSize, 16U);
+else if (TuncateType == MVT::i8)
+  TruncateSize = std::max(TruncateSize, 8U);
+else
+  return false;
+  }
+  if (TruncateSize >= OpSize)
+return false;
+
+  // The shift must be by an immediate that wouldn't expose the zero or sign
+  // extended result.
+  auto *ShiftAmount = dyn_cast(N->getOperand(1));
+  if (!ShiftAmount || ShiftAmount->getZExtValue() > OpSize - TruncateSize)
+return false;
+
+  // Only make the replacement when it avoids clobbering used flags. This is a
+  // similar heuristic as used in the conversion to LEA, namely looking at the
+  // operand for an instruction that creates flags where those flags are used.
+  // This will have both false positives and false negatives. Ideally, both of
+  // these happen later on. Perhaps in copy to flags lowering or in register
+  // allocation.
+  bool MightClobberFlags = false;
+  SDNode *Input = N->getOperand(0).getNode();
+  for (auto Use : Input->uses()) {
+if (Use->getOpcode() == ISD::CopyToReg) {
+  auto *RegisterNode =
+  dyn_cast(Use->getOperand(1).getNode());
+  if (RegisterNode && RegisterNode->getReg() == X86::EFLAGS) {
+MightClobberFlags = true;
+break;
+  }
+}
+  }
+  if (!MightClobberFlags)
+return false;

RKSimon wrote:

Is this correct? The logic appears to be flipped.

https://github.com/llvm/llvm-project/pull/77964
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [libc] [clang-tools-extra] [llvm] [compiler-rt] [clang] [lldb] [lld] [flang] [libcxx] [libunwind] [X86] Use RORX over SHR imm (PR #77964)

2024-01-25 Thread Simon Pilgrim via lldb-commits

https://github.com/RKSimon edited 
https://github.com/llvm/llvm-project/pull/77964
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [clang-tools-extra] [lldb] [libc] [llvm] [clang] [libcxxabi] [libunwind] [libcxx] [flang] [lld] [compiler-rt] Fix a bug in Smith's algorithm used in complex div/mul. (PR #78330)

2024-01-18 Thread Simon Pilgrim via lldb-commits

https://github.com/RKSimon updated 
https://github.com/llvm/llvm-project/pull/78330

>From 8f8917528e30d2ba67f669cfd1a893bc85c21121 Mon Sep 17 00:00:00 2001
From: Ammarguellat 
Date: Tue, 16 Jan 2024 11:24:03 -0800
Subject: [PATCH 1/4] Fixed a bug in Smith's algorithm and made sure last
 option in command line rules.

---
 clang/lib/CodeGen/CGExprComplex.cpp   |  8 ++--
 clang/lib/Driver/ToolChains/Clang.cpp | 19 ++-
 clang/test/CodeGen/cx-complex-range.c | 16 
 clang/test/Driver/range.c |  7 +++
 4 files changed, 39 insertions(+), 11 deletions(-)

diff --git a/clang/lib/CodeGen/CGExprComplex.cpp 
b/clang/lib/CodeGen/CGExprComplex.cpp
index e532794b71bdb4a..6fbd8f19eeb50a4 100644
--- a/clang/lib/CodeGen/CGExprComplex.cpp
+++ b/clang/lib/CodeGen/CGExprComplex.cpp
@@ -936,7 +936,7 @@ ComplexPairTy 
ComplexExprEmitter::EmitRangeReductionDiv(llvm::Value *LHSr,
   llvm::Value *RC = Builder.CreateFMul(CdD, RHSr);  // rc
   llvm::Value *DpRC = Builder.CreateFAdd(RHSi, RC); // tmp=d+rc
 
-  llvm::Value *T7 = Builder.CreateFMul(LHSr, RC);// ar
+  llvm::Value *T7 = Builder.CreateFMul(LHSr, CdD);   // ar
   llvm::Value *T8 = Builder.CreateFAdd(T7, LHSi);// ar+b
   llvm::Value *DSTFr = Builder.CreateFDiv(T8, DpRC); // (ar+b)/tmp
 
@@ -978,7 +978,11 @@ ComplexPairTy ComplexExprEmitter::EmitBinDiv(const 
BinOpInfo ) {
   return EmitRangeReductionDiv(LHSr, LHSi, RHSr, RHSi);
 else if (Op.FPFeatures.getComplexRange() == LangOptions::CX_Limited)
   return EmitAlgebraicDiv(LHSr, LHSi, RHSr, RHSi);
-else if (!CGF.getLangOpts().FastMath) {
+else if (!CGF.getLangOpts().FastMath ||
+ // '-ffast-math' is used in the command line but followed by an
+ // '-fno-cx-limited-range'.
+ (CGF.getLangOpts().FastMath &&
+  Op.FPFeatures.getComplexRange() == LangOptions::CX_Full)) {
   LHSi = OrigLHSi;
   // If we have a complex operand on the RHS and FastMath is not allowed, 
we
   // delegate to a libcall to handle all of the complexities and minimize
diff --git a/clang/lib/Driver/ToolChains/Clang.cpp 
b/clang/lib/Driver/ToolChains/Clang.cpp
index 9edae3fec91a87f..0c05d1db3960718 100644
--- a/clang/lib/Driver/ToolChains/Clang.cpp
+++ b/clang/lib/Driver/ToolChains/Clang.cpp
@@ -2753,6 +2753,7 @@ static void RenderFloatingPointOptions(const ToolChain 
, const Driver ,
   StringRef Float16ExcessPrecision = "";
   StringRef BFloat16ExcessPrecision = "";
   LangOptions::ComplexRangeKind Range = LangOptions::ComplexRangeKind::CX_Full;
+  std::string ComplexRangeStr = "";
 
   if (const Arg *A = Args.getLastArg(options::OPT_flimited_precision_EQ)) {
 CmdArgs.push_back("-mlimit-float-precision");
@@ -2768,24 +2769,24 @@ static void RenderFloatingPointOptions(const ToolChain 
, const Driver ,
 case options::OPT_fcx_limited_range: {
   EmitComplexRangeDiag(D, Range, 
LangOptions::ComplexRangeKind::CX_Limited);
   Range = LangOptions::ComplexRangeKind::CX_Limited;
-  std::string ComplexRangeStr = RenderComplexRangeOption("limited");
-  if (!ComplexRangeStr.empty())
-CmdArgs.push_back(Args.MakeArgString(ComplexRangeStr));
+  ComplexRangeStr = RenderComplexRangeOption("limited");
   break;
 }
 case options::OPT_fno_cx_limited_range:
+  EmitComplexRangeDiag(D, Range, LangOptions::ComplexRangeKind::CX_Full);
   Range = LangOptions::ComplexRangeKind::CX_Full;
+  ComplexRangeStr = RenderComplexRangeOption("full");
   break;
 case options::OPT_fcx_fortran_rules: {
   EmitComplexRangeDiag(D, Range, 
LangOptions::ComplexRangeKind::CX_Fortran);
   Range = LangOptions::ComplexRangeKind::CX_Fortran;
-  std::string ComplexRangeStr = RenderComplexRangeOption("fortran");
-  if (!ComplexRangeStr.empty())
-CmdArgs.push_back(Args.MakeArgString(ComplexRangeStr));
+  ComplexRangeStr = RenderComplexRangeOption("fortran");
   break;
 }
 case options::OPT_fno_cx_fortran_rules:
+  EmitComplexRangeDiag(D, Range, LangOptions::ComplexRangeKind::CX_Full);
   Range = LangOptions::ComplexRangeKind::CX_Full;
+  ComplexRangeStr = RenderComplexRangeOption("full");
   break;
 case options::OPT_ffp_model_EQ: {
   // If -ffp-model= is seen, reset to fno-fast-math
@@ -3056,9 +3057,7 @@ static void RenderFloatingPointOptions(const ToolChain 
, const Driver ,
   SeenUnsafeMathModeOption = true;
   // ffast-math enables fortran rules for complex multiplication and
   // division.
-  std::string ComplexRangeStr = RenderComplexRangeOption("limited");
-  if (!ComplexRangeStr.empty())
-CmdArgs.push_back(Args.MakeArgString(ComplexRangeStr));
+  ComplexRangeStr = RenderComplexRangeOption("limited");
   break;
 }
 case options::OPT_fno_fast_math:
@@ -3215,6 +3214,8 @@ static void RenderFloatingPointOptions(const ToolChain 
, const Driver ,

[Lldb-commits] [lldb] 93a5a03 - [lldb] Host::ShellExpandArguments - fix error check for valid dictionary

2022-10-25 Thread Simon Pilgrim via lldb-commits

Author: Simon Pilgrim
Date: 2022-10-25T17:44:04+01:00
New Revision: 93a5a03030ab9f49120f7bd2ec8e84f063da9987

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

LOG: [lldb] Host::ShellExpandArguments - fix error check for valid dictionary

Fix repeated check for a valid JSON parse and actually check the dictionary 
pointer

Reported here: https://pvs-studio.com/en/blog/posts/cpp/1003/ (N40)

Added: 


Modified: 
lldb/source/Host/windows/Host.cpp

Removed: 




diff  --git a/lldb/source/Host/windows/Host.cpp 
b/lldb/source/Host/windows/Host.cpp
index df7859d9b46c9..6908f0003eaf7 100644
--- a/lldb/source/Host/windows/Host.cpp
+++ b/lldb/source/Host/windows/Host.cpp
@@ -245,7 +245,7 @@ Status Host::ShellExpandArguments(ProcessLaunchInfo 
_info) {
 }
 
 auto dict_sp = data_sp->GetAsDictionary();
-if (!data_sp) {
+if (!dict_sp) {
   error.SetErrorString("invalid JSON");
   return error;
 }



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


[Lldb-commits] [lldb] 850bc76 - [lldb] BreakpointOptions::CommandData::CreateFromStructuredData - remove dead code + variable. NFCI.

2022-02-27 Thread Simon Pilgrim via lldb-commits

Author: Simon Pilgrim
Date: 2022-02-27T11:33:14Z
New Revision: 850bc76a356b050b92851ad5a6a8207da05685cd

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

LOG: [lldb] BreakpointOptions::CommandData::CreateFromStructuredData - remove 
dead code + variable. NFCI.

The found_something bool is only ever read after it has always been set to true.

Looks to be a leftover debugging variable.

Fixes static analyzer warning: 
https://llvm.org/reports/scan-build/report-BreakpointOptions.cpp-CreateFromStructuredData-8-4055b9.html#EndPath

Added: 


Modified: 
lldb/source/Breakpoint/BreakpointOptions.cpp

Removed: 




diff  --git a/lldb/source/Breakpoint/BreakpointOptions.cpp 
b/lldb/source/Breakpoint/BreakpointOptions.cpp
index 3dcb1904c8f8f..6fc6948aaccc2 100644
--- a/lldb/source/Breakpoint/BreakpointOptions.cpp
+++ b/lldb/source/Breakpoint/BreakpointOptions.cpp
@@ -60,14 +60,10 @@ std::unique_ptr
 BreakpointOptions::CommandData::CreateFromStructuredData(
 const StructuredData::Dictionary _dict, Status ) {
   std::unique_ptr data_up(new CommandData());
-  bool found_something = false;
 
   bool success = options_dict.GetValueForKeyAsBoolean(
   GetKey(OptionNames::StopOnError), data_up->stop_on_error);
 
-  if (success)
-found_something = true;
-
   llvm::StringRef interpreter_str;
   ScriptLanguage interp_language;
   success = options_dict.GetValueForKeyAsString(
@@ -78,7 +74,6 @@ BreakpointOptions::CommandData::CreateFromStructuredData(
 return data_up;
   }
 
-  found_something = true;
   interp_language = ScriptInterpreter::StringToLanguage(interpreter_str);
   if (interp_language == eScriptLanguageUnknown) {
 error.SetErrorStringWithFormatv("Unknown breakpoint command language: 
{0}.",
@@ -91,7 +86,6 @@ BreakpointOptions::CommandData::CreateFromStructuredData(
   success = options_dict.GetValueForKeyAsArray(GetKey(OptionNames::UserSource),
user_source);
   if (success) {
-found_something = true;
 size_t num_elems = user_source->GetSize();
 for (size_t i = 0; i < num_elems; i++) {
   llvm::StringRef elem_string;
@@ -101,10 +95,7 @@ BreakpointOptions::CommandData::CreateFromStructuredData(
 }
   }
 
-  if (found_something)
-return data_up;
-  else
-return std::unique_ptr();
+  return data_up;
 }
 
 const char *BreakpointOptions::g_option_names[(



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


[Lldb-commits] [lldb] b81b3ac - [lldb] TypeSystemClang - use castAs/cast<> instead of getAs/dyn_cast<> to avoid dereference of nullptr

2022-01-29 Thread Simon Pilgrim via lldb-commits

Author: Simon Pilgrim
Date: 2022-01-29T15:34:26Z
New Revision: b81b3ac66886f2c93a2bab52f24ed38e9b5d34a7

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

LOG: [lldb] TypeSystemClang - use castAs/cast<> instead of getAs/dyn_cast<> to 
avoid dereference of nullptr

The pointers are dereferenced immediately, so assert the cast is correct 
instead of returning nullptr

Added: 


Modified: 
lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp

Removed: 




diff  --git a/lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp 
b/lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp
index 51b34669ebadc..418f613e5cc95 100644
--- a/lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp
+++ b/lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp
@@ -154,7 +154,7 @@ void addOverridesForMethod(clang::CXXMethodDecl *decl) {
   [, decl](const clang::CXXBaseSpecifier *specifier,
  clang::CXXBasePath ) {
 if (auto *base_record = llvm::dyn_cast(
-specifier->getType()->getAs()->getDecl())) {
+specifier->getType()->castAs()->getDecl())) 
{
 
   clang::DeclarationName name = decl->getDeclName();
 
@@ -3175,7 +3175,7 @@ bool TypeSystemClang::IsBlockPointerType(
 if (qual_type->isBlockPointerType()) {
   if (function_pointer_type_ptr) {
 const clang::BlockPointerType *block_pointer_type =
-qual_type->getAs();
+qual_type->castAs();
 QualType pointee_type = block_pointer_type->getPointeeType();
 QualType function_pointer_type = 
m_ast_up->getPointerType(pointee_type);
 *function_pointer_type_ptr =
@@ -3817,13 +3817,13 @@ 
TypeSystemClang::GetTypeInfo(lldb::opaque_compiler_type_t type,
   const clang::Type::TypeClass type_class = qual_type->getTypeClass();
   switch (type_class) {
   case clang::Type::Attributed:
-return GetTypeInfo(
-qual_type->getAs()
-->getModifiedType().getAsOpaquePtr(),
-pointee_or_element_clang_type);
+return GetTypeInfo(qual_type->castAs()
+   ->getModifiedType()
+   .getAsOpaquePtr(),
+   pointee_or_element_clang_type);
   case clang::Type::Builtin: {
-const clang::BuiltinType *builtin_type = 
llvm::dyn_cast(
-qual_type->getCanonicalTypeInternal());
+const clang::BuiltinType *builtin_type =
+llvm::cast(qual_type->getCanonicalTypeInternal());
 
 uint32_t builtin_type_flags = eTypeIsBuiltIn | eTypeHasValue;
 switch (builtin_type->getKind()) {
@@ -4359,7 +4359,7 @@ 
TypeSystemClang::GetNumMemberFunctions(lldb::opaque_compiler_type_t type) {
 
 case clang::Type::ObjCObjectPointer: {
   const clang::ObjCObjectPointerType *objc_class_type =
-  qual_type->getAs();
+  qual_type->castAs();
   const clang::ObjCInterfaceType *objc_interface_type =
   objc_class_type->getInterfaceType();
   if (objc_interface_type &&
@@ -4443,7 +4443,7 @@ 
TypeSystemClang::GetMemberFunctionAtIndex(lldb::opaque_compiler_type_t type,
 
 case clang::Type::ObjCObjectPointer: {
   const clang::ObjCObjectPointerType *objc_class_type =
-  qual_type->getAs();
+  qual_type->castAs();
   const clang::ObjCInterfaceType *objc_interface_type =
   objc_class_type->getInterfaceType();
   if (objc_interface_type &&
@@ -5596,7 +5596,7 @@ uint32_t 
TypeSystemClang::GetNumFields(lldb::opaque_compiler_type_t type) {
 
   case clang::Type::ObjCObjectPointer: {
 const clang::ObjCObjectPointerType *objc_class_type =
-qual_type->getAs();
+qual_type->castAs();
 const clang::ObjCInterfaceType *objc_interface_type =
 objc_class_type->getInterfaceType();
 if (objc_interface_type &&
@@ -5745,7 +5745,7 @@ CompilerType 
TypeSystemClang::GetFieldAtIndex(lldb::opaque_compiler_type_t type,
 
   case clang::Type::ObjCObjectPointer: {
 const clang::ObjCObjectPointerType *objc_class_type =
-qual_type->getAs();
+qual_type->castAs();
 const clang::ObjCInterfaceType *objc_interface_type =
 objc_class_type->getInterfaceType();
 if (objc_interface_type &&
@@ -5882,7 +5882,7 @@ CompilerType TypeSystemClang::GetDirectBaseClassAtIndex(
   const clang::CXXRecordDecl *base_class_decl =
   llvm::cast(
   base_class->getType()
-  ->getAs()
+  ->castAs()
   ->getDecl());
   if (base_class->isVirtual())
 *bit_offset_ptr =
@@ -5977,7 +5977,7 @@ CompilerType TypeSystemClang::GetVirtualBaseClassAtIndex(
   const clang::CXXRecordDecl *base_class_decl =
   

[Lldb-commits] [lldb] 058c5df - Raise the minimum Visual Studio version to VS2019

2022-01-29 Thread Simon Pilgrim via lldb-commits

Author: Simon Pilgrim
Date: 2022-01-29T10:56:41Z
New Revision: 058c5dfc78cd1a1a6075bba9799e63f3ec871c0d

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

LOG: Raise the minimum Visual Studio version to VS2019

As raised here: 
https://lists.llvm.org/pipermail/llvm-dev/2021-November/153881.html

Now that VS2022 is on general release, LLVM is expected to build on VS2017, 
VS2019 and VS2022, which is proving hazardous to maintain due to changes in 
behaviour including preprocessor and constexpr changes. Plus of the few 
developers that work with VS, many have already moved to VS2019/22.

This patch proposes to raise the minimum supported version to VS2019 (16.x) - 
I've made the hard limit 16.0 or later, with the soft limit VS2019 16.7 - older 
versions of VS2019 are "allowed" (at your own risk) via the 
LLVM_FORCE_USE_OLD_TOOLCHAIN cmake flag.

Differential Revision: https://reviews.llvm.org/D114639

Added: 


Modified: 
clang/docs/ClangFormatStyleOptions.rst
clang/docs/UsersManual.rst
lldb/docs/resources/build.rst
lldb/docs/resources/test.rst
llvm/cmake/modules/CheckCompilerVersion.cmake
llvm/docs/CMake.rst
llvm/docs/GettingStarted.rst
llvm/docs/GettingStartedVS.rst
llvm/docs/ReleaseNotes.rst
llvm/include/llvm/Support/Compiler.h

Removed: 




diff  --git a/clang/docs/ClangFormatStyleOptions.rst 
b/clang/docs/ClangFormatStyleOptions.rst
index 76318e91cb203..bc1c2944c3961 100644
--- a/clang/docs/ClangFormatStyleOptions.rst
+++ b/clang/docs/ClangFormatStyleOptions.rst
@@ -162,7 +162,7 @@ the configuration (without a prefix: ``Auto``).
 `_
   * ``Microsoft``
 A style complying with `Microsoft's style guide
-
`_
+
`_
   * ``GNU``
 A style complying with the `GNU coding standards
 `_

diff  --git a/clang/docs/UsersManual.rst b/clang/docs/UsersManual.rst
index 227884f6aad6a..1df96296cb8ac 100644
--- a/clang/docs/UsersManual.rst
+++ b/clang/docs/UsersManual.rst
@@ -3657,7 +3657,7 @@ When using CMake and the Visual Studio generators, the 
toolset can be set with t
 
   ::
 
-cmake -G"Visual Studio 15 2017" -T LLVM ..
+cmake -G"Visual Studio 16 2019" -T LLVM ..
 
 When using CMake with the Ninja generator, set the ``CMAKE_C_COMPILER`` and
 ``CMAKE_CXX_COMPILER`` variables to clang-cl:

diff  --git a/lldb/docs/resources/build.rst b/lldb/docs/resources/build.rst
index c333134408f1d..5e67955c9c104 100644
--- a/lldb/docs/resources/build.rst
+++ b/lldb/docs/resources/build.rst
@@ -86,7 +86,7 @@ LLDB must use debug python as well.
 Windows
 ***
 
-* Visual Studio 2017.
+* Visual Studio 2019.
 * The latest Windows SDK.
 * The Active Template Library (ATL).
 * `GnuWin32 `_ for CoreUtils and Make.
@@ -121,8 +121,8 @@ process. They only need to be performed once.
 
 ::
 
-> regsvr32 "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\DIA 
SDK\bin\msdia140.dll"
-> regsvr32 "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\DIA 
SDK\bin\amd64\msdia140.dll"
+> regsvr32 "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\DIA 
SDK\bin\msdia140.dll"
+> regsvr32 "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\DIA 
SDK\bin\amd64\msdia140.dll"
 
 Any command prompt from which you build LLDB should have a valid Visual Studio
 environment setup. This means you should open an appropriate `Developer Command
@@ -300,7 +300,7 @@ project in another directory.
 
 ::
 
-  $ cmake -G "Visual Studio 15 2017 Win64" -Thost=x64  
+  $ cmake -G "Visual Studio 16 2019" -A x64 -T host=x64  

 
 Then you can open the .sln file in Visual Studio, set lldb as the startup
 project, and use F5 to run it. You need only edit the project settings to set

diff  --git a/lldb/docs/resources/test.rst b/lldb/docs/resources/test.rst
index fd4a24450ece9..f76800b88f808 100644
--- a/lldb/docs/resources/test.rst
+++ b/lldb/docs/resources/test.rst
@@ -599,7 +599,7 @@ A quick guide to getting started with PTVS is as follows:
 #. Right click the Project node in Solution Explorer.
 #. In the General tab, Make sure Python 3.5 Debug is the selected 
Interpreter.
 #. In Debug/Search Paths, enter the path to your ninja/lib/site-packages 
directory.
-#. In Debug/Environment Variables, enter ``VCINSTALLDIR=C:\Program Files 
(x86)\Microsoft Visual Studio 14.0\VC\``.
+#. In Debug/Environment Variables, enter ``VCINSTALLDIR=C:\Program Files 
(x86)\Microsoft Visual 

[Lldb-commits] [lldb] 49d38b1 - Fix "not all control paths return a value" warning. NFC.

2022-01-23 Thread Simon Pilgrim via lldb-commits

Author: Simon Pilgrim
Date: 2022-01-23T15:14:10Z
New Revision: 49d38b1d618c02964af93068ee8e1ac753722104

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

LOG: Fix "not all control paths return a value" warning. NFC.

Added: 


Modified: 
lldb/source/Plugins/Language/CPlusPlus/GenericBitset.cpp

Removed: 




diff  --git a/lldb/source/Plugins/Language/CPlusPlus/GenericBitset.cpp 
b/lldb/source/Plugins/Language/CPlusPlus/GenericBitset.cpp
index c8063915b178d..d1d844bb4ca41 100644
--- a/lldb/source/Plugins/Language/CPlusPlus/GenericBitset.cpp
+++ b/lldb/source/Plugins/Language/CPlusPlus/GenericBitset.cpp
@@ -72,6 +72,7 @@ ConstString 
GenericBitsetFrontEnd::GetDataContainerMemberName() {
   case StdLib::LibStdcpp:
 return ConstString("_M_w");
   }
+  llvm_unreachable("Unknown StdLib enum");
 }
 
 bool GenericBitsetFrontEnd::Update() {



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


[Lldb-commits] [lldb] d7aa402 - [lldb] PdbAstBuilder - use cast<> instead of dyn_cast<> to avoid dereference of nullptr

2022-01-23 Thread Simon Pilgrim via lldb-commits

Author: Simon Pilgrim
Date: 2022-01-23T15:11:08Z
New Revision: d7aa402b4b8a325a68c20d0300ac6bc664766be0

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

LOG: [lldb] PdbAstBuilder - use cast<> instead of dyn_cast<> to avoid 
dereference of nullptr

The pointers are dereferenced immediately, so assert the cast is correct 
instead of returning nullptr

Added: 


Modified: 
lldb/source/Plugins/SymbolFile/NativePDB/PdbAstBuilder.cpp

Removed: 




diff  --git a/lldb/source/Plugins/SymbolFile/NativePDB/PdbAstBuilder.cpp 
b/lldb/source/Plugins/SymbolFile/NativePDB/PdbAstBuilder.cpp
index 9473befa6cc34..dc0969a0ce7c6 100644
--- a/lldb/source/Plugins/SymbolFile/NativePDB/PdbAstBuilder.cpp
+++ b/lldb/source/Plugins/SymbolFile/NativePDB/PdbAstBuilder.cpp
@@ -1081,7 +1081,7 @@ PdbAstBuilder::GetOrCreateFunctionDecl(PdbCompilandSymId 
func_id) {
 
   clang::FunctionDecl *function_decl = nullptr;
   if (parent->isRecord()) {
-clang::QualType parent_qt = llvm::dyn_cast(parent)
+clang::QualType parent_qt = llvm::cast(parent)
 ->getTypeForDecl()
 ->getCanonicalTypeInternal();
 lldb::opaque_compiler_type_t parent_opaque_ty =
@@ -1318,7 +1318,7 @@ void PdbAstBuilder::ParseAllNamespacesPlusChildrenOf(
 if (!context->isNamespace())
   continue;
 
-clang::NamespaceDecl *ns = llvm::dyn_cast(context);
+clang::NamespaceDecl *ns = llvm::cast(context);
 std::string actual_ns = ns->getQualifiedNameAsString();
 if (llvm::StringRef(actual_ns).startswith(*parent)) {
   clang::QualType qt = GetOrCreateType(tid);



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


[Lldb-commits] [lldb] d13847b - [lldb] TerminalState::Save - fix unused variable warning

2022-01-23 Thread Simon Pilgrim via lldb-commits

Author: Simon Pilgrim
Date: 2022-01-23T15:12:44Z
New Revision: d13847bbe5e632ec8f62abc81f74b9351a56d28c

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

LOG: [lldb] TerminalState::Save - fix unused variable warning

Non-POSIX target builds don't use the file descriptor

Added: 


Modified: 
lldb/source/Host/common/Terminal.cpp

Removed: 




diff  --git a/lldb/source/Host/common/Terminal.cpp 
b/lldb/source/Host/common/Terminal.cpp
index 2a1c12e667bcf..831e9dff4eb18 100644
--- a/lldb/source/Host/common/Terminal.cpp
+++ b/lldb/source/Host/common/Terminal.cpp
@@ -417,8 +417,8 @@ bool TerminalState::Save(Terminal term, bool 
save_process_group) {
   Clear();
   m_tty = term;
   if (m_tty.IsATerminal()) {
-int fd = m_tty.GetFileDescriptor();
 #if LLDB_ENABLE_POSIX
+int fd = m_tty.GetFileDescriptor();
 m_tflags = ::fcntl(fd, F_GETFL, 0);
 #if LLDB_ENABLE_TERMIOS
 std::unique_ptr new_data{new Terminal::Data()};



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


[Lldb-commits] [lldb] c934913 - [lldb] CxxModuleHandler - use cast<> instead of dyn_cast<> to avoid dereference of nullptr

2022-01-23 Thread Simon Pilgrim via lldb-commits

Author: Simon Pilgrim
Date: 2022-01-23T15:10:33Z
New Revision: c93491352cf3146559de7755283f0dd259392126

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

LOG: [lldb] CxxModuleHandler - use cast<> instead of dyn_cast<> to avoid 
dereference of nullptr

The pointer is dereferenced immediately, so assert the cast is correct instead 
of returning nullptr

Added: 


Modified: 
lldb/source/Plugins/ExpressionParser/Clang/CxxModuleHandler.cpp

Removed: 




diff  --git a/lldb/source/Plugins/ExpressionParser/Clang/CxxModuleHandler.cpp 
b/lldb/source/Plugins/ExpressionParser/Clang/CxxModuleHandler.cpp
index 74dd04600b4be..fecffd1183f89 100644
--- a/lldb/source/Plugins/ExpressionParser/Clang/CxxModuleHandler.cpp
+++ b/lldb/source/Plugins/ExpressionParser/Clang/CxxModuleHandler.cpp
@@ -138,7 +138,7 @@ getEqualLocalDeclContext(Sema , DeclContext 
*foreign_ctxt) {
 
   // We currently only support building namespaces.
   if (foreign_ctxt->isNamespace()) {
-NamedDecl *ns = llvm::dyn_cast(foreign_ctxt);
+NamedDecl *ns = llvm::cast(foreign_ctxt);
 llvm::StringRef ns_name = ns->getName();
 
 auto lookup_result = emulateLookupInCtxt(sema, ns_name, *parent);



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


[Lldb-commits] [lldb] 307cfad - Fix extraneous ')' error.

2021-06-11 Thread Simon Pilgrim via lldb-commits

Author: Simon Pilgrim
Date: 2021-06-11T14:50:22+01:00
New Revision: 307cfad0d639b0397033069473e84e6c7f249056

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

LOG: Fix extraneous ')' error.

Added: 


Modified: 
lldb/source/Core/DumpDataExtractor.cpp

Removed: 




diff  --git a/lldb/source/Core/DumpDataExtractor.cpp 
b/lldb/source/Core/DumpDataExtractor.cpp
index 93aaae8a1040..175ffef04a81 100644
--- a/lldb/source/Core/DumpDataExtractor.cpp
+++ b/lldb/source/Core/DumpDataExtractor.cpp
@@ -116,7 +116,7 @@ static lldb::offset_t DumpAPInt(Stream *s, const 
DataExtractor ,
 bool is_signed, unsigned radix) {
   llvm::Optional apint = GetAPInt(data, , byte_size);
   if (apint.hasValue()) {
-std::string apint_str = toString(apint.getValue(), radix, is_signed));
+std::string apint_str = toString(apint.getValue(), radix, is_signed);
 switch (radix) {
 case 2:
   s->Write("0b", 2);



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


[Lldb-commits] [lldb] cd2e500 - [lldb] DumpDataExtractor.cpp - replace APInt::toString() with llvm::toString(APInt)

2021-06-11 Thread Simon Pilgrim via lldb-commits

Author: Simon Pilgrim
Date: 2021-06-11T13:39:14+01:00
New Revision: cd2e500e555e134ffc19d07f26b17d0b0c71efd9

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

LOG: [lldb] DumpDataExtractor.cpp - replace APInt::toString() with 
llvm::toString(APInt)

APInt::toString() was removed rG61cdaf66fe22be2b5942ddee4f46a998b4f3ee29

Added: 


Modified: 
lldb/source/Core/DumpDataExtractor.cpp

Removed: 




diff  --git a/lldb/source/Core/DumpDataExtractor.cpp 
b/lldb/source/Core/DumpDataExtractor.cpp
index 66fcfbd43bd29..93aaae8a10408 100644
--- a/lldb/source/Core/DumpDataExtractor.cpp
+++ b/lldb/source/Core/DumpDataExtractor.cpp
@@ -116,7 +116,7 @@ static lldb::offset_t DumpAPInt(Stream *s, const 
DataExtractor ,
 bool is_signed, unsigned radix) {
   llvm::Optional apint = GetAPInt(data, , byte_size);
   if (apint.hasValue()) {
-std::string apint_str(apint.getValue().toString(radix, is_signed));
+std::string apint_str = toString(apint.getValue(), radix, is_signed));
 switch (radix) {
 case 2:
   s->Write("0b", 2);



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


[Lldb-commits] [lldb] 754f3c4 - Fix implicit Twine.h include dependency.

2020-06-26 Thread Simon Pilgrim via lldb-commits

Author: Simon Pilgrim
Date: 2020-06-26T13:24:32+01:00
New Revision: 754f3c4af4b8526d7576c8e92959ad10d40b6e2e

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

LOG: Fix implicit Twine.h include dependency.

Added: 


Modified: 
lldb/tools/intel-features/intel-mpx/cli-wrapper-mpxtable.cpp

Removed: 




diff  --git a/lldb/tools/intel-features/intel-mpx/cli-wrapper-mpxtable.cpp 
b/lldb/tools/intel-features/intel-mpx/cli-wrapper-mpxtable.cpp
index 5bffd27409e8..d2ef0445bc67 100644
--- a/lldb/tools/intel-features/intel-mpx/cli-wrapper-mpxtable.cpp
+++ b/lldb/tools/intel-features/intel-mpx/cli-wrapper-mpxtable.cpp
@@ -19,6 +19,7 @@
 #include "lldb/API/SBThread.h"
 
 #include "llvm/ADT/Triple.h"
+#include "llvm/ADT/Twine.h"
 
 static bool GetPtr(char *cptr, uint64_t , lldb::SBFrame ,
lldb::SBCommandReturnObject ) {



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