[Lldb-commits] [PATCH] D139158: [LLDB][LoongArch] Make software single stepping work
xen0n added a comment. I think you can remove the example from your commit message altogether, it's giving essentially no information while making the text very lengthy. Only keeping the first paragraph should be enough. Comment at: lldb/source/Plugins/Instruction/CMakeLists.txt:7 add_subdirectory(RISCV) +add_subdirectory(LoongArch) The list is sorted alphabetically so this should come before MIPS. Comment at: lldb/source/Plugins/Instruction/LoongArch/EmulateInstructionLoongArch.h:10 +#ifndef LLDB_SOURCE_PLUGINS_INSTRUCTION_LoongArch_EMULATEINSTRUCTIONLoongArch_H +#define LLDB_SOURCE_PLUGINS_INSTRUCTION_LoongArch_EMULATEINSTRUCTIONLoongArch_H + Use `ALL_CAPS` for this include guard symbol. Comment at: lldb/source/Plugins/Instruction/LoongArch/EmulateInstructionLoongArch.h:24 + static llvm::StringRef GetPluginDescriptionStatic() { +return "Emulate instructions for the loongarch architecture."; + } Use "LoongArch" here because it's intended to be a human-readable string. Comment at: lldb/tools/lldb-server/CMakeLists.txt:57 lldbPluginInstructionRISCV + lldbPluginInstructionLoongArch ${LLDB_SYSTEM_LIBS} Put before MIPS for alphabetical order too. Comment at: lldb/tools/lldb-server/SystemInitializerLLGS.cpp:49 +#if defined(__loongarch) || defined(__loongarch64) +#define LLDB_TARGET_LoongArch There's no `__loongarch`, only `__loongarch__` (we're more classical than RISC-V in this regard). Instead simply use `#if defined(__loongarch__)` as the code enabled by this condition isn't really caring its bitness. Comment at: lldb/tools/lldb-server/SystemInitializerLLGS.cpp:74-76 +#if defined(LLDB_TARGET_LoongArch) + EmulateInstructionLoongArch::Initialize(); +#endif Alphabetize this chunk too. Comment at: lldb/tools/lldb-server/SystemInitializerLLGS.cpp:96-98 +#if defined(LLDB_TARGET_LoongArch) + EmulateInstructionLoongArch::Terminate(); +#endif Ditto. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D139158/new/ https://reviews.llvm.org/D139158 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] d2a6114 - [lldb/unittests] Use std::nullopt instead of None (NFC)
Author: Kazu Hirata Date: 2022-12-04T16:51:27-08:00 New Revision: d2a6114f27016065f6c7e7d39c0412e7d8d5e03b URL: https://github.com/llvm/llvm-project/commit/d2a6114f27016065f6c7e7d39c0412e7d8d5e03b DIFF: https://github.com/llvm/llvm-project/commit/d2a6114f27016065f6c7e7d39c0412e7d8d5e03b.diff LOG: [lldb/unittests] Use std::nullopt instead of None (NFC) This patch mechanically replaces None with std::nullopt where the compiler would warn if None were deprecated. The intent is to reduce the amount of manual work required in migrating from Optional to std::optional. This is part of an effort to migrate from llvm::Optional to std::optional: https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalue-getvalue-getvalueor/63716 Added: Modified: lldb/unittests/Core/SourceLocationSpecTest.cpp lldb/unittests/DataFormatter/StringPrinterTests.cpp lldb/unittests/Host/SocketTest.cpp lldb/unittests/ObjectFile/Breakpad/BreakpadRecordsTest.cpp lldb/unittests/Process/gdb-remote/GDBRemoteClientBaseTest.cpp lldb/unittests/Process/gdb-remote/GDBRemoteCommunicationClientTest.cpp lldb/unittests/Process/minidump/MinidumpParserTest.cpp lldb/unittests/ScriptInterpreter/Python/PythonTestSuite.cpp lldb/unittests/Signals/UnixSignalsTest.cpp lldb/unittests/Symbol/TestLineEntry.cpp lldb/unittests/Symbol/TestTypeSystemClang.cpp lldb/unittests/SymbolFile/DWARF/DWARFIndexCachingTest.cpp lldb/unittests/Target/MemoryTagMapTest.cpp lldb/unittests/Utility/FileSpecTest.cpp lldb/unittests/Utility/ListenerTest.cpp lldb/unittests/Utility/PredicateTest.cpp lldb/unittests/Utility/ProcessInstanceInfoTest.cpp lldb/unittests/Utility/RegisterValueTest.cpp lldb/unittests/Utility/StringExtractorGDBRemoteTest.cpp lldb/unittests/Utility/TimeoutTest.cpp lldb/unittests/Utility/UriParserTest.cpp lldb/unittests/Utility/UserIDResolverTest.cpp lldb/unittests/tools/lldb-server/tests/TestClient.cpp Removed: diff --git a/lldb/unittests/Core/SourceLocationSpecTest.cpp b/lldb/unittests/Core/SourceLocationSpecTest.cpp index 089c7640cc010..0cf1683906eed 100644 --- a/lldb/unittests/Core/SourceLocationSpecTest.cpp +++ b/lldb/unittests/Core/SourceLocationSpecTest.cpp @@ -51,7 +51,7 @@ TEST(SourceLocationSpecTest, FileLineColumnComponents) { EXPECT_TRUE(without_column); EXPECT_EQ(fs, without_column.GetFileSpec()); EXPECT_EQ(line, without_column.GetLine().value_or(0)); - EXPECT_EQ(llvm::None, without_column.GetColumn()); + EXPECT_EQ(std::nullopt, without_column.GetColumn()); EXPECT_FALSE(without_column.GetCheckInlines()); EXPECT_TRUE(without_column.GetExactMatch()); EXPECT_STREQ("check inlines = false, exact match = true, decl = /foo/bar:19", diff --git a/lldb/unittests/DataFormatter/StringPrinterTests.cpp b/lldb/unittests/DataFormatter/StringPrinterTests.cpp index a7fa6e8a13190..24c0ff41b5db2 100644 --- a/lldb/unittests/DataFormatter/StringPrinterTests.cpp +++ b/lldb/unittests/DataFormatter/StringPrinterTests.cpp @@ -41,7 +41,7 @@ static Optional format(StringRef input, endian::InlHostByteOrder(), sizeof(void *))); const bool success = StringPrinter::ReadBufferAndDumpToStream(opts); if (!success) -return llvm::None; +return std::nullopt; return out.GetString().str(); } diff --git a/lldb/unittests/Host/SocketTest.cpp b/lldb/unittests/Host/SocketTest.cpp index a209600141ff3..78e1e11df0656 100644 --- a/lldb/unittests/Host/SocketTest.cpp +++ b/lldb/unittests/Host/SocketTest.cpp @@ -179,7 +179,7 @@ TEST_P(SocketTest, DomainGetConnectURI) { CreateDomainConnectedSockets(domain_path, &socket_a_up, &socket_b_up); std::string uri(socket_a_up->GetRemoteConnectionURI()); - EXPECT_EQ((URI{"unix-connect", "", llvm::None, domain_path}), + EXPECT_EQ((URI{"unix-connect", "", std::nullopt, domain_path}), URI::Parse(uri)); EXPECT_EQ(socket_b_up->GetRemoteConnectionURI(), ""); diff --git a/lldb/unittests/ObjectFile/Breakpad/BreakpadRecordsTest.cpp b/lldb/unittests/ObjectFile/Breakpad/BreakpadRecordsTest.cpp index 519dbd22a0b81..68a8980d692a4 100644 --- a/lldb/unittests/ObjectFile/Breakpad/BreakpadRecordsTest.cpp +++ b/lldb/unittests/ObjectFile/Breakpad/BreakpadRecordsTest.cpp @@ -25,9 +25,9 @@ TEST(Record, classify) { EXPECT_EQ(Record::StackWin, Record::classify("STACK WIN")); // Any obviously incorrect lines will be classified as such. - EXPECT_EQ(llvm::None, Record::classify("STACK")); - EXPECT_EQ(llvm::None, Record::classify("STACK CODE_ID")); - EXPECT_EQ(llvm::None, Record::classify("CODE_ID")); + EXPECT_EQ(std::nullopt, Record::classify("STACK")); + EXPECT_EQ(std::nullopt, Record::classify("STACK CODE_ID")); + EXPECT_EQ(std::nullopt, Record::classify("CODE_ID")); // Any line which does not start with a known keyword will be classified as a // line record, as
[Lldb-commits] [lldb] 768cae4 - [lldb] Use std::nullopt instead of None in comments (NFC)
Author: Kazu Hirata Date: 2022-12-04T20:11:39-08:00 New Revision: 768cae4a5ab3a564b25ed36c379423f71b42d9d0 URL: https://github.com/llvm/llvm-project/commit/768cae4a5ab3a564b25ed36c379423f71b42d9d0 DIFF: https://github.com/llvm/llvm-project/commit/768cae4a5ab3a564b25ed36c379423f71b42d9d0.diff LOG: [lldb] Use std::nullopt instead of None in comments (NFC) This is part of an effort to migrate from llvm::Optional to std::optional: https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalue-getvalue-getvalueor/63716 Added: Modified: lldb/include/lldb/Breakpoint/BreakpointID.h lldb/include/lldb/Core/Communication.h lldb/include/lldb/Core/SourceLocationSpec.h lldb/include/lldb/Core/ThreadedCommunication.h lldb/include/lldb/Interpreter/CommandObject.h lldb/include/lldb/Symbol/Function.h lldb/include/lldb/Target/MemoryTagMap.h lldb/include/lldb/Target/PathMappingList.h lldb/include/lldb/Target/TraceCursor.h lldb/include/lldb/Target/TraceDumper.h lldb/include/lldb/Utility/FileSpec.h lldb/include/lldb/Utility/StringExtractorGDBRemote.h lldb/include/lldb/Utility/Timeout.h lldb/include/lldb/Utility/TraceGDBRemotePackets.h lldb/source/API/SBCommandInterpreter.cpp lldb/source/Breakpoint/BreakpointResolverFileLine.cpp lldb/source/Expression/Materializer.cpp lldb/source/Plugins/Disassembler/LLVMC/DisassemblerLLVMC.cpp lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp lldb/source/Plugins/Instruction/RISCV/EmulateInstructionRISCV.cpp lldb/source/Plugins/Process/Linux/IntelPTCollector.cpp lldb/source/Plugins/Process/Linux/IntelPTMultiCoreTrace.h lldb/source/Plugins/Process/Linux/IntelPTSingleBufferTrace.h lldb/source/Plugins/SymbolFile/DWARF/DIERef.h lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp lldb/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.cpp lldb/source/Plugins/Trace/intel-pt/CommandObjectTraceStartIntelPT.h lldb/source/Plugins/Trace/intel-pt/DecodedThread.h lldb/source/Plugins/Trace/intel-pt/LibiptDecoder.h lldb/source/Plugins/Trace/intel-pt/ThreadDecoder.h lldb/source/Plugins/Trace/intel-pt/TraceIntelPT.h lldb/source/Plugins/Trace/intel-pt/TraceIntelPTMultiCpuDecoder.h lldb/source/Target/MemoryTagMap.cpp Removed: diff --git a/lldb/include/lldb/Breakpoint/BreakpointID.h b/lldb/include/lldb/Breakpoint/BreakpointID.h index 64432f2d3cd5c..d3d75f81fd34e 100644 --- a/lldb/include/lldb/Breakpoint/BreakpointID.h +++ b/lldb/include/lldb/Breakpoint/BreakpointID.h @@ -55,7 +55,7 @@ class BreakpointID { /// A string containing JUST the breakpoint description. /// \return /// If \p input was not a valid breakpoint ID string, returns - /// \b llvm::None. Otherwise returns a BreakpointID with members filled + /// \b std::nullopt. Otherwise returns a BreakpointID with members filled /// out accordingly. static llvm::Optional ParseCanonicalReference(llvm::StringRef input); diff --git a/lldb/include/lldb/Core/Communication.h b/lldb/include/lldb/Core/Communication.h index a0151527fe5de..f5f636816cb4f 100644 --- a/lldb/include/lldb/Core/Communication.h +++ b/lldb/include/lldb/Core/Communication.h @@ -100,7 +100,7 @@ class Communication { /// number of bytes that can be placed into \a dst. /// /// \param[in] timeout - /// A timeout value or llvm::None for no timeout. + /// A timeout value or std::nullopt for no timeout. /// /// \return /// The number of bytes actually read. diff --git a/lldb/include/lldb/Core/SourceLocationSpec.h b/lldb/include/lldb/Core/SourceLocationSpec.h index 3b58b2818d22f..5463b402e6d5a 100644 --- a/lldb/include/lldb/Core/SourceLocationSpec.h +++ b/lldb/include/lldb/Core/SourceLocationSpec.h @@ -29,7 +29,7 @@ class SourceLocationSpec { /// Constructor. /// /// Takes a \a file_spec with a \a line number and a \a column number. If - /// \a column is null or not provided, it is set to llvm::None. + /// \a column is null or not provided, it is set to std::nullopt. /// /// \param[in] file_spec /// The full or partial path to a file. diff --git a/lldb/include/lldb/Core/ThreadedCommunication.h b/lldb/include/lldb/Core/ThreadedCommunication.h index b7412c796f107..2e3afde3c0582 100644 --- a/lldb/include/lldb/Core/ThreadedCommunication.h +++ b/lldb/include/lldb/Core/ThreadedCommunication.h @@ -131,7 +131,7 @@ class ThreadedCommunication : public Communication, public Broadcaster { /// number of bytes that can be placed into \a dst. /// /// \param[in] timeout - /// A timeout value or llvm::None for no timeout. + /// A timeout value or std::nullopt for no timeout. /// /// \return /// The number of bytes actually read. diff --git a/lldb/include/lldb/Interpreter/CommandObject.h b/lldb/include/lldb/
[Lldb-commits] [lldb] 3dfacc0 - CheckedArithmetic: llvm::Optional => std::optional
Author: Fangrui Song Date: 2022-12-05T04:30:54Z New Revision: 3dfacc0a56e9d5718f51b1d3ce63070e79fc2608 URL: https://github.com/llvm/llvm-project/commit/3dfacc0a56e9d5718f51b1d3ce63070e79fc2608 DIFF: https://github.com/llvm/llvm-project/commit/3dfacc0a56e9d5718f51b1d3ce63070e79fc2608.diff LOG: CheckedArithmetic: llvm::Optional => std::optional Added: Modified: lldb/source/Plugins/Instruction/ARM64/EmulateInstructionARM64.cpp llvm/include/llvm/Analysis/VectorUtils.h llvm/include/llvm/Support/CheckedArithmetic.h llvm/lib/FileCheck/FileCheck.cpp llvm/unittests/Support/CheckedArithmeticTest.cpp Removed: diff --git a/lldb/source/Plugins/Instruction/ARM64/EmulateInstructionARM64.cpp b/lldb/source/Plugins/Instruction/ARM64/EmulateInstructionARM64.cpp index 3fc529ae20281..25042b12f1939 100644 --- a/lldb/source/Plugins/Instruction/ARM64/EmulateInstructionARM64.cpp +++ b/lldb/source/Plugins/Instruction/ARM64/EmulateInstructionARM64.cpp @@ -560,7 +560,7 @@ uint64_t EmulateInstructionARM64:: AddWithCarry(uint32_t N, uint64_t x, uint64_t y, bit carry_in, EmulateInstructionARM64::ProcState &proc_state) { uint64_t unsigned_sum = UInt(x) + UInt(y) + UInt(carry_in); - llvm::Optional signed_sum = llvm::checkedAdd(SInt(x), SInt(y)); + std::optional signed_sum = llvm::checkedAdd(SInt(x), SInt(y)); bool overflow = !signed_sum; if (!overflow) overflow |= !llvm::checkedAdd(*signed_sum, SInt(carry_in)); diff --git a/llvm/include/llvm/Analysis/VectorUtils.h b/llvm/include/llvm/Analysis/VectorUtils.h index 0f2346cf7c57e..02271d5780c82 100644 --- a/llvm/include/llvm/Analysis/VectorUtils.h +++ b/llvm/include/llvm/Analysis/VectorUtils.h @@ -641,7 +641,7 @@ template class InterleaveGroup { /// \returns false if the instruction doesn't belong to the group. bool insertMember(InstTy *Instr, int32_t Index, Align NewAlign) { // Make sure the key fits in an int32_t. -Optional MaybeKey = checkedAdd(Index, SmallestKey); +std::optional MaybeKey = checkedAdd(Index, SmallestKey); if (!MaybeKey) return false; int32_t Key = *MaybeKey; @@ -664,7 +664,7 @@ template class InterleaveGroup { } else if (Key < SmallestKey) { // Make sure the largest index fits in an int32_t. - Optional MaybeLargestIndex = checkedSub(LargestKey, Key); + std::optional MaybeLargestIndex = checkedSub(LargestKey, Key); if (!MaybeLargestIndex) return false; diff --git a/llvm/include/llvm/Support/CheckedArithmetic.h b/llvm/include/llvm/Support/CheckedArithmetic.h index c9db239672d36..5bfc551b2cc5b 100644 --- a/llvm/include/llvm/Support/CheckedArithmetic.h +++ b/llvm/include/llvm/Support/CheckedArithmetic.h @@ -15,8 +15,8 @@ #define LLVM_SUPPORT_CHECKEDARITHMETIC_H #include "llvm/ADT/APInt.h" -#include "llvm/ADT/Optional.h" +#include #include namespace { @@ -26,7 +26,7 @@ namespace { /// \return Empty optional if the operation overflows, or result otherwise. template std::enable_if_t::value && sizeof(T) * 8 <= 64, - llvm::Optional> + std::optional> checkedOp(T LHS, T RHS, F Op, bool Signed = true) { llvm::APInt ALHS(sizeof(T) * 8, LHS, Signed); llvm::APInt ARHS(sizeof(T) * 8, RHS, Signed); @@ -44,7 +44,7 @@ namespace llvm { /// \return Optional of sum if no signed overflow occurred, /// \c None otherwise. template -std::enable_if_t::value, llvm::Optional> +std::enable_if_t::value, std::optional> checkedAdd(T LHS, T RHS) { return checkedOp(LHS, RHS, &llvm::APInt::sadd_ov); } @@ -53,7 +53,7 @@ checkedAdd(T LHS, T RHS) { /// \return Optional of sum if no signed overflow occurred, /// \c None otherwise. template -std::enable_if_t::value, llvm::Optional> +std::enable_if_t::value, std::optional> checkedSub(T LHS, T RHS) { return checkedOp(LHS, RHS, &llvm::APInt::ssub_ov); } @@ -62,7 +62,7 @@ checkedSub(T LHS, T RHS) { /// \return Optional of product if no signed overflow occurred, /// \c None otherwise. template -std::enable_if_t::value, llvm::Optional> +std::enable_if_t::value, std::optional> checkedMul(T LHS, T RHS) { return checkedOp(LHS, RHS, &llvm::APInt::smul_ov); } @@ -71,7 +71,7 @@ checkedMul(T LHS, T RHS) { /// \return Optional of result if no signed overflow occurred, /// \c None otherwise. template -std::enable_if_t::value, llvm::Optional> +std::enable_if_t::value, std::optional> checkedMulAdd(T A, T B, T C) { if (auto Product = checkedMul(A, B)) return checkedAdd(*Product, C); @@ -82,7 +82,7 @@ checkedMulAdd(T A, T B, T C) { /// \return Optional of sum if no unsigned overflow occurred, /// \c None otherwise. template -std::enable_if_t::value, llvm::Optional> +std::enable_if_t::value, std::optional> checkedAddUnsigned(T LHS, T RHS) { return checkedOp(LHS, RHS, &llvm::APInt::uadd_ov, /*Signed=*/false); } @@ -91,7 +91,7 @@ checkedAddUnsi
[Lldb-commits] [lldb] 7760971 - Forward-declare raw_ostream (NFC)
Author: Kazu Hirata Date: 2022-12-04T21:43:10-08:00 New Revision: 77609717410372e8c43aca49a268511378f58297 URL: https://github.com/llvm/llvm-project/commit/77609717410372e8c43aca49a268511378f58297 DIFF: https://github.com/llvm/llvm-project/commit/77609717410372e8c43aca49a268511378f58297.diff LOG: Forward-declare raw_ostream (NFC) This patch adds forward declarations of raw_ostream to those header files that are relying on the forward declaration of raw_ostream in llvm/include/llvm/ADT/Optional.h. I'm planning to move operator<< for Optional and std::optional from Optional.h to llvm/include/llvm/Support/raw_ostream.h. Once I do so, we no longer need to forward-declare raw_ostream in Optional.h. Added: Modified: clang/include/clang/APINotes/Types.h lldb/include/lldb/Utility/UriParser.h llvm/include/llvm/IR/Attributes.h llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.h Removed: diff --git a/clang/include/clang/APINotes/Types.h b/clang/include/clang/APINotes/Types.h index eb27ffccc17f..8dfc3bf4f1e5 100644 --- a/clang/include/clang/APINotes/Types.h +++ b/clang/include/clang/APINotes/Types.h @@ -15,6 +15,10 @@ #include #include +namespace llvm { +class raw_ostream; +} // namespace llvm + namespace clang { namespace api_notes { enum class RetainCountConventionKind { diff --git a/lldb/include/lldb/Utility/UriParser.h b/lldb/include/lldb/Utility/UriParser.h index 3c0f8d2273d0..035e44d6a23c 100644 --- a/lldb/include/lldb/Utility/UriParser.h +++ b/lldb/include/lldb/Utility/UriParser.h @@ -12,6 +12,10 @@ #include "llvm/ADT/Optional.h" #include "llvm/ADT/StringRef.h" +namespace llvm { +class raw_ostream; +} // namespace llvm + namespace lldb_private { struct URI { diff --git a/llvm/include/llvm/IR/Attributes.h b/llvm/include/llvm/IR/Attributes.h index cb7900343d67..c4e12a673ed2 100644 --- a/llvm/include/llvm/IR/Attributes.h +++ b/llvm/include/llvm/IR/Attributes.h @@ -44,6 +44,7 @@ class Function; class LLVMContext; class MemoryEffects; class Type; +class raw_ostream; enum class AllocFnKind : uint64_t { Unknown = 0, diff --git a/llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.h b/llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.h index 3b4ff548360f..90c771513a61 100644 --- a/llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.h +++ b/llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.h @@ -31,6 +31,7 @@ class MCRegisterInfo; class MCSubtargetInfo; class StringRef; class Triple; +class raw_ostream; namespace amdhsa { struct kernel_descriptor_t; ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] a996cc2 - Remove unused #include "llvm/ADT/Optional.h"
Author: Fangrui Song Date: 2022-12-05T06:31:11Z New Revision: a996cc217cefb9071888de38c6f05e5742d0106f URL: https://github.com/llvm/llvm-project/commit/a996cc217cefb9071888de38c6f05e5742d0106f DIFF: https://github.com/llvm/llvm-project/commit/a996cc217cefb9071888de38c6f05e5742d0106f.diff LOG: Remove unused #include "llvm/ADT/Optional.h" Added: Modified: clang-tools-extra/clang-include-fixer/find-all-symbols/SymbolInfo.h clang-tools-extra/clang-query/Query.h clang-tools-extra/clang-tidy/readability/AvoidConstParamsInDecls.cpp clang-tools-extra/clangd/refactor/Tweak.cpp clang-tools-extra/clangd/refactor/tweaks/ObjCLocalizeStringLiteral.cpp clang-tools-extra/clangd/refactor/tweaks/SwapIfBranches.cpp clang/include/clang/IndexSerialization/SerializablePathCollection.h clang/include/clang/Serialization/InMemoryModuleCache.h clang/include/clang/StaticAnalyzer/Core/AnalyzerOptions.h clang/include/clang/StaticAnalyzer/Core/PathSensitive/DynamicType.h clang/include/clang/Tooling/Refactoring/RefactoringActionRule.h clang/lib/Basic/Stack.cpp clang/lib/Driver/ToolChains/Arch/RISCV.cpp clang/lib/Driver/ToolChains/Cuda.h clang/lib/Tooling/Syntax/Mutations.cpp clang/unittests/Analysis/FlowSensitive/SignAnalysisTest.cpp clang/unittests/Analysis/FlowSensitive/TestingSupport.cpp clang/unittests/CrossTU/CrossTranslationUnitTest.cpp flang/lib/Optimizer/Transforms/AffineDemotion.cpp lld/MachO/SyntheticSections.h lld/include/lld/Common/Strings.h lldb/include/lldb/Expression/DWARFExpressionList.h lldb/source/Plugins/Instruction/RISCV/RISCVCInstructions.h lldb/source/Plugins/SymbolFile/NativePDB/PdbUtil.h lldb/source/Utility/Listener.cpp lldb/unittests/ObjectFile/ELF/TestObjectFileELF.cpp llvm/include/llvm/ADT/StringSwitch.h llvm/include/llvm/ADT/TypeSwitch.h llvm/include/llvm/Analysis/BasicAliasAnalysis.h llvm/include/llvm/Analysis/DemandedBits.h llvm/include/llvm/Analysis/LazyCallGraph.h llvm/include/llvm/Analysis/ModuleSummaryAnalysis.h llvm/include/llvm/CodeGen/BasicBlockSectionsProfileReader.h llvm/include/llvm/CodeGen/TargetRegisterInfo.h llvm/include/llvm/ExecutionEngine/ExecutionEngine.h llvm/include/llvm/ExecutionEngine/Orc/JITTargetMachineBuilder.h llvm/include/llvm/MC/MCAsmBackend.h llvm/include/llvm/MC/MCDwarf.h llvm/include/llvm/MC/MCInstrAnalysis.h llvm/include/llvm/MC/MCSubtargetInfo.h llvm/include/llvm/MC/MCSymbolXCOFF.h llvm/include/llvm/ObjCopy/ELF/ELFConfig.h llvm/include/llvm/Object/DXContainer.h llvm/include/llvm/Support/CachePruning.h llvm/include/llvm/Support/CommandLine.h llvm/include/llvm/Support/GlobPattern.h llvm/include/llvm/Support/ToolOutputFile.h llvm/include/llvm/Support/raw_ostream.h llvm/include/llvm/Target/CGPassBuilderOption.h llvm/include/llvm/Testing/Support/Annotations.h llvm/include/llvm/WindowsDriver/MSVCPaths.h llvm/lib/Analysis/CGSCCPassManager.cpp llvm/lib/CodeGen/SelectionDAG/FastISel.cpp llvm/lib/DebugInfo/CodeView/TypeStreamMerger.cpp llvm/lib/DebugInfo/DWARF/DWARFDebugInfoEntry.cpp llvm/lib/DebugInfo/PDB/Native/NativeEnumTypes.cpp llvm/lib/ExecutionEngine/Orc/ObjectLinkingLayer.cpp llvm/lib/ObjCopy/ELF/ELFObjcopy.cpp llvm/lib/Support/GlobPattern.cpp llvm/lib/Transforms/IPO/Inliner.cpp llvm/lib/Transforms/IPO/PartialInlining.cpp llvm/lib/Transforms/Instrumentation/ThreadSanitizer.cpp llvm/lib/Transforms/Scalar/CorrelatedValuePropagation.cpp llvm/lib/Transforms/Scalar/IndVarSimplify.cpp llvm/lib/Transforms/Utils/LoopUnrollAndJam.cpp llvm/tools/llvm-cov/CoverageExporterJson.cpp llvm/tools/llvm-exegesis/lib/Clustering.h llvm/tools/llvm-jitlink/llvm-jitlink.h llvm/tools/llvm-objcopy/ObjcopyOptions.cpp llvm/tools/llvm-pdbutil/DumpOutputStyle.h llvm/tools/llvm-pdbutil/TypeReferenceTracker.h llvm/tools/llvm-remark-size-diff/RemarkSizeDiff.cpp llvm/tools/llvm-tapi-diff/DiffEngine.h llvm/unittests/DebugInfo/DWARF/DWARFDebugInfoTest.cpp polly/lib/Transform/MatmulOptimizer.cpp Removed: diff --git a/clang-tools-extra/clang-include-fixer/find-all-symbols/SymbolInfo.h b/clang-tools-extra/clang-include-fixer/find-all-symbols/SymbolInfo.h index 7f8fa9089865a..1a93dff4100b0 100644 --- a/clang-tools-extra/clang-include-fixer/find-all-symbols/SymbolInfo.h +++ b/clang-tools-extra/clang-include-fixer/find-all-symbols/SymbolInfo.h @@ -9,7 +9,6 @@ #ifndef LLVM_CLANG_TOOLS_EXTRA_INCLUDE_FIXER_FIND_ALL_SYMBOLS_SYMBOLINFO_H #define LLVM_CLANG_TOOLS_EXTRA_INCLUDE_FIXER_FIND_ALL_SYMBOLS_SYMBOLINFO_H -#include "llvm/ADT/Optional.h" #include "llvm/ADT/StringRef.h" #include "llvm/Support/YAMLTraits.h" #include "llvm/Support/raw_ostream.h" diff --git a/clang-tools-extra/clang-query/Query.h b/clang-tools-ext
[Lldb-commits] [lldb] c95a0c9 - [lldb] Fix the way we set up the lldb modules infrastructure.
Author: Vassil Vassilev Date: 2022-12-05T07:39:19Z New Revision: c95a0c91c0de66eb1066f23c69332522656f188e URL: https://github.com/llvm/llvm-project/commit/c95a0c91c0de66eb1066f23c69332522656f188e DIFF: https://github.com/llvm/llvm-project/commit/c95a0c91c0de66eb1066f23c69332522656f188e.diff LOG: [lldb] Fix the way we set up the lldb modules infrastructure. D127284 introduced a new language option which is not benign from modules perspective. Before this patch lldb would set up the compiler invocation and later enable incremental processing. Post-D127284 this does not work because the option causes a module hash mismatch for implicit modules. In addition, D127284 enables parsing statements on the global scope if incremental processing is on and thus `syntax_error_for_lldb_to_find` was rightfully not recognized as a declaration and is considered a statement which produces a slightly different diagnostic. Thanks to Michael Buch for the help in understanding this issue. This patch should appease the lldb bots. More discussion available at: https://reviews.llvm.org/D127284 Added: Modified: lldb/source/Plugins/ExpressionParser/Clang/ClangModulesDeclVendor.cpp lldb/test/API/lang/objc/modules-compile-error/TestModulesCompileError.py Removed: diff --git a/lldb/source/Plugins/ExpressionParser/Clang/ClangModulesDeclVendor.cpp b/lldb/source/Plugins/ExpressionParser/Clang/ClangModulesDeclVendor.cpp index ec4e9f12fc974..eea21f3f05fc9 100644 --- a/lldb/source/Plugins/ExpressionParser/Clang/ClangModulesDeclVendor.cpp +++ b/lldb/source/Plugins/ExpressionParser/Clang/ClangModulesDeclVendor.cpp @@ -609,7 +609,8 @@ ClangModulesDeclVendor::Create(Target &target) { "-target", arch.GetTriple().str(), "-fmodules-validate-system-headers", - "-Werror=non-modular-include-in-framework-module"}; + "-Werror=non-modular-include-in-framework-module", + "-Xclang=-fincremental-extensions"}; target.GetPlatform()->AddClangModuleCompilationOptions( &target, compiler_invocation_arguments); @@ -701,8 +702,6 @@ ClangModulesDeclVendor::Create(Target &target) { instance->getFrontendOpts().Inputs[0])) return nullptr; - instance->getPreprocessor().enableIncrementalProcessing(); - instance->createASTReader(); instance->createSema(action->getTranslationUnitKind(), nullptr); diff --git a/lldb/test/API/lang/objc/modules-compile-error/TestModulesCompileError.py b/lldb/test/API/lang/objc/modules-compile-error/TestModulesCompileError.py index 9a5cb257601da..45296ab4bf035 100644 --- a/lldb/test/API/lang/objc/modules-compile-error/TestModulesCompileError.py +++ b/lldb/test/API/lang/objc/modules-compile-error/TestModulesCompileError.py @@ -16,6 +16,6 @@ def test(self): # Check that the error message shows file/line/column, prints the relevant # line from the source code and mentions the module that failed to build. self.expect("expr @import LLDBTestModule", error=True, -substrs=["module.h:4:1: error: unknown type name 'syntax_error_for_lldb_to_find'", +substrs=["module.h:4:1: error: undeclared identifier 'syntax_error_for_lldb_to_find'", "syntax_error_for_lldb_to_find // comment that tests source printing", "could not build module 'LLDBTestModule'"]) ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits